1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #28628 -- Changed \d to [0-9] in regexes where appropriate.

This commit is contained in:
Ad Timmering
2021-11-26 10:44:54 +09:00
committed by Mariusz Felisiak
parent fe76944269
commit bdf3e156b4
10 changed files with 35 additions and 17 deletions

View File

@@ -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 ')
with self.assertRaises(ValueError):
parse_http_date('Sun Nov 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(