mirror of
https://github.com/django-components/django-components.git
synced 2025-10-17 01:07:12 +00:00
Move django bootstrapping to separate file so it can be reused between test modules.
This commit is contained in:
parent
d3261ca50a
commit
143918e2cf
2 changed files with 13 additions and 10 deletions
|
@ -1,16 +1,7 @@
|
|||
from textwrap import dedent
|
||||
import unittest
|
||||
import django
|
||||
from django.conf import settings
|
||||
from django_components import component
|
||||
|
||||
settings.configure(
|
||||
TEMPLATES=[{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': ["tests/templates/"],
|
||||
}]
|
||||
)
|
||||
django.setup()
|
||||
from .django_test_setup import * # NOQA
|
||||
|
||||
class SimpleComponent(component.Component):
|
||||
def context(self, variable=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue