diff --git a/tests/__init__.py b/tests/__init__.py index aadc141..468ab11 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -8,6 +8,7 @@ parent = os.path.dirname(os.path.dirname( sys.path.insert(0, parent) +import django from django.test import TestCase from django.template import Template, Context from django.core.management import call_command @@ -23,6 +24,12 @@ CHOICES = ( (2, 'Two'), ) +try: + # required by Django 1.7 and later + django.setup() +except: + pass + class ExampleForm(forms.Form): char_field = forms.CharField() choice_field = forms.ChoiceField(choices=CHOICES) diff --git a/tests/fixtures/basic.html b/tests/fixtures/basic.html index 322806e..d316ca5 100644 --- a/tests/fixtures/basic.html +++ b/tests/fixtures/basic.html @@ -1,210 +1,99 @@ - - - - - - -