Kaydet (Commit) 013d439f authored tarafından Tim Graham's avatar Tim Graham

Refs #29600 -- Added test for datetime_safe usage in localize_input().

üst 76852c39
......@@ -949,8 +949,15 @@ class FormattingTests(SimpleTestCase):
)
def test_localized_input_func(self):
tests = (
(True, 'True'),
(datetime.date(1, 1, 1), '0001-01-01'),
(datetime.datetime(1, 1, 1), '0001-01-01 00:00:00'),
)
with self.settings(USE_THOUSAND_SEPARATOR=True):
self.assertEqual(localize_input(True), 'True')
for value, expected in tests:
with self.subTest(value=value):
self.assertEqual(localize_input(value), expected)
def test_sanitize_separators(self):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment