MCPcopy
hub / github.com/django/django / test_parsing_asctime

Method test_parsing_asctime

tests/utils_tests/test_http.py:408–413  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

406 mocked_datetime.reset_mock()
407
408 def test_parsing_asctime(self):
409 parsed = parse_http_date("Sun Nov 6 08:49:37 1994")
410 self.assertEqual(
411 datetime.fromtimestamp(parsed, UTC),
412 datetime(1994, 11, 6, 8, 49, 37, tzinfo=UTC),
413 )
414
415 def test_parsing_asctime_nonascii_digits(self):
416 """Non-ASCII unicode decimals raise an error."""

Callers

nothing calls this directly

Calls 1

parse_http_dateFunction · 0.90

Tested by

no test coverage detected