diff options
| author | Claude Paroz <claude@2xlibre.net> | 2021-09-09 07:42:05 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-09-14 12:05:43 +0200 |
| commit | 676bd084f2509f4201561d5c77ed4ecbd157bfa0 (patch) | |
| tree | bc8dfe6748a6bfc5fe8c728a5f825dfff575cb56 /tests/view_tests | |
| parent | 04e023e38331d6717af1cbd8da4926af612f7831 (diff) | |
Fixed #32873 -- Deprecated settings.USE_L10N.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Diffstat (limited to 'tests/view_tests')
| -rw-r--r-- | tests/view_tests/tests/test_debug.py | 2 | ||||
| -rw-r--r-- | tests/view_tests/tests/test_i18n.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/view_tests/tests/test_debug.py b/tests/view_tests/tests/test_debug.py index aa3cf4b839..5ceb7fc39e 100644 --- a/tests/view_tests/tests/test_debug.py +++ b/tests/view_tests/tests/test_debug.py @@ -195,7 +195,7 @@ class DebugViewTests(SimpleTestCase): """ Numeric IDs and fancy traceback context blocks line numbers shouldn't be localized. """ - with self.settings(DEBUG=True, USE_L10N=True): + with self.settings(DEBUG=True): with self.assertLogs('django.request', 'ERROR'): response = self.client.get('/raises500/') # We look for a HTML fragment of the form diff --git a/tests/view_tests/tests/test_i18n.py b/tests/view_tests/tests/test_i18n.py index 9276f61fea..63e9ef76c6 100644 --- a/tests/view_tests/tests/test_i18n.py +++ b/tests/view_tests/tests/test_i18n.py @@ -206,8 +206,8 @@ class I18NViewTests(SimpleTestCase): def test_get_formats(self): formats = get_formats() # Test 3 possible types in get_formats: integer, string, and list. - self.assertEqual(formats['FIRST_DAY_OF_WEEK'], 0) - self.assertEqual(formats['DECIMAL_SEPARATOR'], '.') + self.assertEqual(formats['FIRST_DAY_OF_WEEK'], 1) + self.assertEqual(formats['DECIMAL_SEPARATOR'], ',') self.assertEqual(formats['TIME_INPUT_FORMATS'], ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']) def test_jsi18n(self): @@ -243,7 +243,7 @@ class I18NViewTests(SimpleTestCase): self.assertIn('catalog', data) self.assertIn('formats', data) self.assertEqual(data['formats']['TIME_INPUT_FORMATS'], ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']) - self.assertEqual(data['formats']['FIRST_DAY_OF_WEEK'], 0) + self.assertEqual(data['formats']['FIRST_DAY_OF_WEEK'], 1) self.assertIn('plural', data) self.assertEqual(data['catalog']['month name\x04May'], 'Mai') self.assertIn('DATETIME_FORMAT', data['formats']) |
