mirror of
https://github.com/django-components/django-components.git
synced 2025-09-26 15:39:08 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
7de554b440
commit
3bef2cae11
1 changed files with 4 additions and 0 deletions
|
@ -9,13 +9,16 @@ from django.urls import path
|
|||
# isort: off
|
||||
from .django_test_setup import * # noqa
|
||||
from .testutils import BaseTestCase
|
||||
|
||||
# isort: on
|
||||
|
||||
from django_components import component
|
||||
|
||||
|
||||
class CustomClient(Client):
|
||||
def __init__(self, urlpatterns=None, *args, **kwargs):
|
||||
import types
|
||||
|
||||
if urlpatterns:
|
||||
urls_module = types.ModuleType("urls")
|
||||
urls_module.urlpatterns = urlpatterns # type: ignore
|
||||
|
@ -25,6 +28,7 @@ class CustomClient(Client):
|
|||
settings.SECRET_KEY = "secret" # noqa
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
|
||||
class TestComponentAsView(BaseTestCase):
|
||||
def test_render_component_from_template(self):
|
||||
@component.register("testcomponent")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue