summaryrefslogtreecommitdiff
path: root/tests/humanize_tests
diff options
context:
space:
mode:
authorAd Timmering <awtimmering@gmail.com>2021-11-26 20:40:25 +0900
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-01-07 12:23:33 +0100
commitfe76944269c13d59f8bb3bc1cfff7ab6443777e4 (patch)
tree239916f7d366bfe6108340968b801989359a01d9 /tests/humanize_tests
parent28c98d41133802e4ddcf9d1994b93c69a802fc7a (diff)
downloaddjango-fe76944269c13d59f8bb3bc1cfff7ab6443777e4.tar.gz
Refs #28628 -- Added tests for intcomma with non-ASCII digits.
Diffstat (limited to 'tests/humanize_tests')
-rw-r--r--tests/humanize_tests/tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/humanize_tests/tests.py b/tests/humanize_tests/tests.py
index d710a99263..298ca3f789 100644
--- a/tests/humanize_tests/tests.py
+++ b/tests/humanize_tests/tests.py
@@ -69,11 +69,13 @@ class HumanizeTests(SimpleTestCase):
100, 1000, 10123, 10311, 1000000, 1234567.25, '100', '1000',
'10123', '10311', '1000000', '1234567.1234567',
Decimal('1234567.1234567'), None,
+ '1234567', '1234567.12',
)
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', '1,234,567.1234567',
'1,234,567.1234567', None,
+ '1,234,567', '1,234,567.12',
)
with translation.override('en'):
self.humanize_tester(test_list, result_list, 'intcomma')
@@ -83,11 +85,13 @@ class HumanizeTests(SimpleTestCase):
100, 1000, 10123, 10311, 1000000, 1234567.25, '100', '1000',
'10123', '10311', '1000000', '1234567.1234567',
Decimal('1234567.1234567'), None,
+ '1234567', '1234567.12',
)
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', '1,234,567.1234567',
'1,234,567.1234567', None,
+ '1,234,567', '1,234,567.12',
)
with self.settings(USE_THOUSAND_SEPARATOR=False):
with translation.override('en'):