summaryrefslogtreecommitdiff
path: root/tests/humanize_tests
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/humanize_tests
parent04e023e38331d6717af1cbd8da4926af612f7831 (diff)
downloaddjango-676bd084f2509f4201561d5c77ed4ecbd157bfa0.tar.gz
Fixed #32873 -- Deprecated settings.USE_L10N.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Diffstat (limited to 'tests/humanize_tests')
-rw-r--r--tests/humanize_tests/tests.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/humanize_tests/tests.py b/tests/humanize_tests/tests.py
index a0d16bbfed..d710a99263 100644
--- a/tests/humanize_tests/tests.py
+++ b/tests/humanize_tests/tests.py
@@ -89,13 +89,13 @@ class HumanizeTests(SimpleTestCase):
'100', '1,000', '10,123', '10,311', '1,000,000', '1,234,567.1234567',
'1,234,567.1234567', None,
)
- with self.settings(USE_L10N=True, USE_THOUSAND_SEPARATOR=False):
+ with self.settings(USE_THOUSAND_SEPARATOR=False):
with translation.override('en'):
self.humanize_tester(test_list, result_list, 'intcomma')
def test_intcomma_without_number_grouping(self):
# Regression for #17414
- with translation.override('ja'), self.settings(USE_L10N=True):
+ with translation.override('ja'):
self.humanize_tester([100], ['100'], 'intcomma')
def test_intword(self):
@@ -126,7 +126,7 @@ class HumanizeTests(SimpleTestCase):
'100', '1000', '10123', '10311', '1000000', None)
result_list = ('100', '1.000', '10.123', '10.311', '1.000.000', '1.234.567,25',
'100', '1.000', '10.123', '10.311', '1.000.000', None)
- with self.settings(USE_L10N=True, USE_THOUSAND_SEPARATOR=True):
+ with self.settings(USE_THOUSAND_SEPARATOR=True):
with translation.override('de'):
self.humanize_tester(test_list, result_list, 'intcomma')
@@ -143,7 +143,7 @@ class HumanizeTests(SimpleTestCase):
# Negative integers.
test_list_negative = ('-' + test for test in test_list_positive)
result_list_negative = ('-' + result for result in result_list_positive)
- with self.settings(USE_L10N=True, USE_THOUSAND_SEPARATOR=True):
+ with self.settings(USE_THOUSAND_SEPARATOR=True):
with translation.override('de'):
self.humanize_tester(
(*test_list_positive, *test_list_negative),
@@ -355,7 +355,7 @@ class HumanizeTests(SimpleTestCase):
orig_humanize_datetime, humanize.datetime = humanize.datetime, MockDateTime
try:
# Choose a language with different naturaltime-past/naturaltime-future translations
- with translation.override('cs'), self.settings(USE_L10N=True):
+ with translation.override('cs'):
self.humanize_tester(test_list, result_list, 'naturaltime')
finally:
humanize.datetime = orig_humanize_datetime