diff --git a/tests/test_component.py b/tests/test_component.py index a3caae13..cc7f6fe1 100644 --- a/tests/test_component.py +++ b/tests/test_component.py @@ -1,10 +1,9 @@ from textwrap import dedent -from django.test import SimpleTestCase - from django_components import component from .django_test_setup import * # NOQA +from .testutils import Django111CompatibleSimpleTestCase as SimpleTestCase class ComponentRegistryTest(SimpleTestCase): diff --git a/tests/test_templatetags.py b/tests/test_templatetags.py index 67f73815..1839810c 100644 --- a/tests/test_templatetags.py +++ b/tests/test_templatetags.py @@ -1,11 +1,11 @@ from textwrap import dedent from django.template import Context, Template -from django.test import SimpleTestCase from django_components import component from .django_test_setup import * # NOQA +from .testutils import Django111CompatibleSimpleTestCase as SimpleTestCase class SimpleComponent(component.Component): diff --git a/tests/testutils.py b/tests/testutils.py new file mode 100644 index 00000000..d9859618 --- /dev/null +++ b/tests/testutils.py @@ -0,0 +1,7 @@ +from django.test import SimpleTestCase + + +class Django111CompatibleSimpleTestCase(SimpleTestCase): + def assertHTMLEqual(self, left, right): + left = left.replace(' type="text/javascript"', '') + super(Django111CompatibleSimpleTestCase, self).assertHTMLEqual(left, right)