summaryrefslogtreecommitdiff
path: root/tests/admin_utils/tests.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2015-12-26 18:46:51 +0100
committerClaude Paroz <claude@2xlibre.net>2015-12-28 20:29:08 +0100
commit35c41987ecfaad849019d09468ce322fec86cd39 (patch)
treedfd403acbb79307aeab29062a4872d0b7f934bdd /tests/admin_utils/tests.py
parent0d855990f76c3a072092cede74a816d79ab9e416 (diff)
Moved LogEntry-related tests to their own test case
Thanks Tim Graham for reviewing and contributing to the patch. Refs #21113.
Diffstat (limited to 'tests/admin_utils/tests.py')
-rw-r--r--tests/admin_utils/tests.py27
1 files changed, 0 insertions, 27 deletions
diff --git a/tests/admin_utils/tests.py b/tests/admin_utils/tests.py
index 069433fd7d..6e054a8537 100644
--- a/tests/admin_utils/tests.py
+++ b/tests/admin_utils/tests.py
@@ -5,7 +5,6 @@ from decimal import Decimal
from django import forms
from django.conf import settings
-from django.contrib import admin
from django.contrib.admin import helpers
from django.contrib.admin.utils import (
NestedObjects, display_for_field, flatten, flatten_fieldsets,
@@ -13,7 +12,6 @@ from django.contrib.admin.utils import (
)
from django.db import DEFAULT_DB_ALIAS, models
from django.test import SimpleTestCase, TestCase, override_settings
-from django.utils import six
from django.utils.formats import localize
from django.utils.safestring import mark_safe
@@ -303,31 +301,6 @@ class UtilsTests(SimpleTestCase):
('awesome guest', None),
)
- def test_logentry_unicode(self):
- """
- Regression test for #15661
- """
- log_entry = admin.models.LogEntry()
-
- log_entry.action_flag = admin.models.ADDITION
- self.assertTrue(
- six.text_type(log_entry).startswith('Added ')
- )
-
- log_entry.action_flag = admin.models.CHANGE
- self.assertTrue(
- six.text_type(log_entry).startswith('Changed ')
- )
-
- log_entry.action_flag = admin.models.DELETION
- self.assertTrue(
- six.text_type(log_entry).startswith('Deleted ')
- )
-
- # Make sure custom action_flags works
- log_entry.action_flag = 4
- self.assertEqual(six.text_type(log_entry), 'LogEntry Object')
-
def test_safestring_in_field_label(self):
# safestring should not be escaped
class MyForm(forms.Form):