diff --git a/tests/__init__.py b/tests/__init__.py index be8abbe..d008b46 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -8,7 +8,7 @@ parent = os.path.dirname(os.path.dirname( sys.path.insert(0, parent) -from unittest import TestCase +from django.test import TestCase from django.template import Template, Context from django.core.management import call_command from django import forms @@ -43,10 +43,10 @@ class BootstrapTemplateTagTests(TestCase): form = ExampleForm() html = Template("{% load bootstrap %}{{ form|bootstrap }}").render(Context({'form': form})) - html = html.strip('\n').strip(' ') image = os.path.join('fixtures', 'basic.html') with open(os.path.join(TEST_DIR, image)) as f: content = f.read() - self.assertEqual(html, content) + self.maxDiff = None + self.assertHTMLEqual(html, content) diff --git a/tests/fixtures/basic.html b/tests/fixtures/basic.html index aa07737..322806e 100644 --- a/tests/fixtures/basic.html +++ b/tests/fixtures/basic.html @@ -1,5 +1,10 @@ + + + + +
@@ -7,7 +12,7 @@
- + @@ -26,7 +31,7 @@
- @@ -51,21 +56,21 @@
@@ -88,7 +93,7 @@
- @@ -111,10 +116,10 @@
-
    -
  • -
  • -
  • +
      +
    • +
    • +
    @@ -134,7 +139,7 @@
    - + @@ -153,7 +158,7 @@
    - + @@ -172,7 +177,8 @@
    - + @@ -190,7 +196,7 @@
    @@ -199,4 +205,6 @@
    -
    \ No newline at end of file +
    + +