summaryrefslogtreecommitdiff
path: root/tests/admin_views
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2021-09-09 07:42:05 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-09-14 12:05:43 +0200
commit676bd084f2509f4201561d5c77ed4ecbd157bfa0 (patch)
treebc8dfe6748a6bfc5fe8c728a5f825dfff575cb56 /tests/admin_views
parent04e023e38331d6717af1cbd8da4926af612f7831 (diff)
Fixed #32873 -- Deprecated settings.USE_L10N.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Diffstat (limited to 'tests/admin_views')
-rw-r--r--tests/admin_views/test_actions.py2
-rw-r--r--tests/admin_views/tests.py14
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/admin_views/test_actions.py b/tests/admin_views/test_actions.py
index 445e437fc2..6c5aa5ad53 100644
--- a/tests/admin_views/test_actions.py
+++ b/tests/admin_views/test_actions.py
@@ -72,7 +72,7 @@ class AdminActionsTest(TestCase):
self.assertContains(response, 'Are you sure you want to delete the selected subscribers?')
self.assertContains(response, '<ul></ul>', html=True)
- @override_settings(USE_THOUSAND_SEPARATOR=True, USE_L10N=True, NUMBER_GROUPING=3)
+ @override_settings(USE_THOUSAND_SEPARATOR=True, NUMBER_GROUPING=3)
def test_non_localized_pk(self):
"""
If USE_THOUSAND_SEPARATOR is set, the ids for the objects selected for
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index b277476296..a8524379f8 100644
--- a/tests/admin_views/tests.py
+++ b/tests/admin_views/tests.py
@@ -109,7 +109,7 @@ class AdminFieldExtractionMixin:
return field
-@override_settings(ROOT_URLCONF='admin_views.urls', USE_I18N=True, USE_L10N=False, LANGUAGE_CODE='en')
+@override_settings(ROOT_URLCONF='admin_views.urls', USE_I18N=True, LANGUAGE_CODE='en')
class AdminViewBasicTestCase(TestCase):
@classmethod
@@ -802,12 +802,12 @@ class AdminViewBasicTest(AdminViewBasicTestCase):
response = self.client.get(reverse('admin-extra-context:jsi18n'))
self.assertEqual(response.status_code, 200)
- def test_L10N_deactivated(self):
+ def test_jsi18n_format_fallback(self):
"""
- Check if L10N is deactivated, the JavaScript i18n view doesn't
- return localized date/time formats. Refs #14824.
+ The JavaScript i18n view doesn't return localized date/time formats
+ when the selected language cannot be found.
"""
- with self.settings(LANGUAGE_CODE='ru', USE_L10N=False), translation.override('none'):
+ with self.settings(LANGUAGE_CODE='ru'), translation.override('none'):
response = self.client.get(reverse('admin:jsi18n'))
self.assertNotContains(response, '%d.%m.%Y %H:%M:%S')
self.assertContains(response, '%Y-%m-%d %H:%M:%S')
@@ -4541,7 +4541,7 @@ class PrePopulatedTest(TestCase):
"&quot;id&quot;: &quot;#id_prepopulatedsubpost_set-0-subslug&quot;"
)
- @override_settings(USE_THOUSAND_SEPARATOR=True, USE_L10N=True)
+ @override_settings(USE_THOUSAND_SEPARATOR=True)
def test_prepopulated_maxlength_localized(self):
"""
Regression test for #15938: if USE_THOUSAND_SEPARATOR is set, make sure
@@ -5704,7 +5704,7 @@ class ValidXHTMLTests(TestCase):
self.assertNotContains(response, ' xml:lang=""')
-@override_settings(ROOT_URLCONF='admin_views.urls', USE_THOUSAND_SEPARATOR=True, USE_L10N=True)
+@override_settings(ROOT_URLCONF='admin_views.urls', USE_THOUSAND_SEPARATOR=True)
class DateHierarchyTests(TestCase):
@classmethod