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 @@ - - - - - - -
- - - - - -
- - - - - -
- + +
+ +
- - -
- - - - - -
- - - - - -
- + +
+ +
- - -
- - - - -
- -
- -
- -
- -
- -
- -
- - - - - + +
+
+
- + +
+ +
+ +
+ +
+
- - -
- - - - - -
- - - - - -
- + +
+ +
- - -
- - - - - -
-
    -
  • -
  • -
  • -
- - - - -
- + +
+
    +
  • +
  • +
  • +
+
- - -
- - - - + -
- - - - - -
- +
+ +
- - -
- - - - + -
- - - - - -
- +
+ +
- - -
- - - - - -
- - - - - -
- + +
+ +
- - -
- -
-
- - - - - - -
+
+
+
- +
- - diff --git a/tests/fixtures/horizontal.html b/tests/fixtures/horizontal.html index b255d51..5634218 100644 --- a/tests/fixtures/horizontal.html +++ b/tests/fixtures/horizontal.html @@ -1,210 +1,102 @@ - - - - - - -
+ - - - - -
- - - - - -
- +
+ +
- - -
- - - - + -
- - - - - -
- +
+ +
- - -
+ - - - -
- -
- -
- -
- -
- -
- -
- - - - - +
+
+
- +
+ +
+
+ +
+
- - -
- - - - + -
- - - - - -
- +
+ +
- - -
- - - - - -
-
    -
  • -
  • -
  • -
- - - - -
- + +
+
    +
  • +
  • +
  • +
+
- - -
+ - - - - -
- - - - - -
- +
+ +
- - -
- - - - + -
- - - - - -
- +
+ +
- - -
- - - - + -
- - - - - -
- +
+ +
- - -
- -
-
- - - - - - -
+
+
+
- +
- - diff --git a/tests/test_settings.py b/tests/test_settings.py index 14d0ca0..2d5ccf9 100644 --- a/tests/test_settings.py +++ b/tests/test_settings.py @@ -10,6 +10,12 @@ DATABASES = { SITE_ID = 1 +MIDDLEWARE_CLASSES = ( + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', +) + INSTALLED_APPS = [ 'django.contrib.contenttypes', 'django.contrib.sites',