mirror of
https://github.com/django-components/django-components.git
synced 2025-08-31 03:07:19 +00:00
Add trick to make tests pass on Django 1.11 too.
This commit is contained in:
parent
ec7b10f4db
commit
e9fba9538f
3 changed files with 9 additions and 3 deletions
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
|
|
7
tests/testutils.py
Normal file
7
tests/testutils.py
Normal file
|
@ -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)
|
Loading…
Add table
Add a link
Reference in a new issue