summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-06-18 15:46:15 -0400
committerTim Graham <timograham@gmail.com>2015-06-18 16:10:44 -0400
commit20c6ba6ffa9d68cad21fcfbdcb1a7d72eaee143c (patch)
treebb1d69c3c55e0a943b004711d223373aa748910d /tests
parent74261bc593bcf9411e7e25a4731dd9471499819e (diff)
Fixed #24962 -- Added newline to characters escaped by contrib.admin.utils.quote()
Thanks alito for the report and patch.
Diffstat (limited to 'tests')
-rw-r--r--tests/admin_utils/tests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/admin_utils/tests.py b/tests/admin_utils/tests.py
index 7296af7eb2..18c95bf768 100644
--- a/tests/admin_utils/tests.py
+++ b/tests/admin_utils/tests.py
@@ -9,7 +9,7 @@ from django.contrib import admin
from django.contrib.admin import helpers
from django.contrib.admin.utils import (
NestedObjects, display_for_field, flatten, flatten_fieldsets,
- label_for_field, lookup_field,
+ label_for_field, lookup_field, quote,
)
from django.db import DEFAULT_DB_ALIAS, models
from django.test import TestCase, override_settings
@@ -379,3 +379,6 @@ class UtilsTests(TestCase):
}),
)
self.assertEqual(flatten_fieldsets(fieldsets), ['url', 'title', 'content', 'sites'])
+
+ def test_quote(self):
+ self.assertEqual(quote('something\nor\nother'), 'something_0Aor_0Aother')