diff options
author | Ad Timmering <awtimmering@gmail.com> | 2021-11-26 10:44:54 +0900 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-01-07 12:25:06 +0100 |
commit | bdf3e156b4b47d45b8e37823164b598afc533ce0 (patch) | |
tree | e27b8a05d1fe76478e06e5114a4f4aa86a5942ab /tests/utils_tests | |
parent | fe76944269c13d59f8bb3bc1cfff7ab6443777e4 (diff) | |
download | django-bdf3e156b4b47d45b8e37823164b598afc533ce0.tar.gz |
Fixed #28628 -- Changed \d to [0-9] in regexes where appropriate.
Diffstat (limited to 'tests/utils_tests')
-rw-r--r-- | tests/utils_tests/test_http.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/utils_tests/test_http.py b/tests/utils_tests/test_http.py index 6867ed8274..77b91a7174 100644 --- a/tests/utils_tests/test_http.py +++ b/tests/utils_tests/test_http.py @@ -328,6 +328,13 @@ class HttpDateProcessingTests(unittest.TestCase): datetime(1994, 11, 6, 8, 49, 37, tzinfo=timezone.utc), ) + def test_parsing_asctime_nonascii_digits(self): + """Non-ASCII unicode decimals raise an error.""" + with self.assertRaises(ValueError): + parse_http_date('Sun Nov 6 08:49:37 1994') + with self.assertRaises(ValueError): + parse_http_date('Sun Nov 12 08:49:37 1994') + def test_parsing_year_less_than_70(self): parsed = parse_http_date('Sun Nov 6 08:49:37 0037') self.assertEqual( |