mirror of
https://github.com/django-components/django-components.git
synced 2025-08-03 22:08:17 +00:00
Move environment setup to the module to get Travis CI to pass.
This commit is contained in:
parent
48e6ea1e12
commit
41122d1592
1 changed files with 8 additions and 9 deletions
|
@ -4,6 +4,14 @@ 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()
|
||||
|
||||
class SimpleComponent(component.Component):
|
||||
def context(self, variable=None):
|
||||
return {
|
||||
|
@ -16,15 +24,6 @@ class SimpleComponent(component.Component):
|
|||
js = ("script.js",)
|
||||
|
||||
class ComponentRegistryTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
settings.configure(
|
||||
TEMPLATES=[{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': ["tests/templates/"],
|
||||
}]
|
||||
)
|
||||
django.setup()
|
||||
|
||||
def test_simple_component(self):
|
||||
comp = SimpleComponent()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue