diff options
author | Tim Graham <timograham@gmail.com> | 2018-02-07 14:20:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-07 14:20:04 -0500 |
commit | fa75b2cb512409116b6f1b5229d6f99074d8e452 (patch) | |
tree | 683c83b6fb4966f10a9f2abba4ebb7cb99cad547 /tests/admin_utils | |
parent | b38532cd6be6ea91b47fd93e9cbaae4aa10015fc (diff) | |
download | django-fa75b2cb512409116b6f1b5229d6f99074d8e452.tar.gz |
Refs #27795 -- Removed force_bytes/text() usage in tests.
Diffstat (limited to 'tests/admin_utils')
-rw-r--r-- | tests/admin_utils/test_logentry.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/admin_utils/test_logentry.py b/tests/admin_utils/test_logentry.py index 1cf0de349d..64ff5fec3e 100644 --- a/tests/admin_utils/test_logentry.py +++ b/tests/admin_utils/test_logentry.py @@ -8,7 +8,6 @@ from django.contrib.contenttypes.models import ContentType from django.test import TestCase, override_settings from django.urls import reverse from django.utils import translation -from django.utils.encoding import force_bytes from django.utils.html import escape from .models import Article, ArticleProxy, Site @@ -211,9 +210,10 @@ class LogEntryTests(TestCase): logentry.content_type = None logentry.save() - counted_presence_before = response.content.count(force_bytes(should_contain)) + should_contain = should_contain.encode() + counted_presence_before = response.content.count(should_contain) response = self.client.get(reverse('admin:index')) - counted_presence_after = response.content.count(force_bytes(should_contain)) + counted_presence_after = response.content.count(should_contain) self.assertEqual(counted_presence_before - 1, counted_presence_after) def test_proxy_model_content_type_is_used_for_log_entries(self): |