Fixed TestAdmin.test_linebreaks() due to linebreaksbr() behavior change on Django 2.1.

Changed in ff05de760c.
This commit is contained in:
Mariusz Felisiak 2018-03-31 18:32:46 +02:00
parent 1969579cf3
commit fb2483ce8d
No known key found for this signature in database
GPG key ID: 2EF56372BA48CD1B

View file

@ -3,6 +3,7 @@ from django.contrib import admin
from django.contrib.auth.models import User, Permission
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import PermissionDenied
from django.template.defaultfilters import linebreaksbr
from django.test import TestCase, RequestFactory
from django.utils import six
@ -59,7 +60,7 @@ class TestAdmin(TestCase):
request.user = self.superuser
response = self.options.changelist_view(request, {})
self.assertContains(response, 'LINEBREAK_VALUE')
self.assertContains(response, 'eggs<br />eggs')
self.assertContains(response, linebreaksbr('eggs\neggs'))
@mock.patch('constance.settings.CONFIG_FIELDSETS', {
'Numbers': ('LONG_VALUE', 'INT_VALUE',),