MCPcopy
hub / github.com/django/django / test_naive_datetime

Method test_naive_datetime

tests/utils_tests/test_dateformat.py:21–23  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

19 self.assertEqual(date.fromtimestamp(int(format(d, "U"))), d)
20
21 def test_naive_datetime(self):
22 dt = datetime(2009, 5, 16, 5, 30, 30)
23 self.assertEqual(datetime.fromtimestamp(int(format(dt, "U"))), dt)
24
25 def test_naive_ambiguous_datetime(self):
26 # dt is ambiguous in Europe/Copenhagen.

Callers

nothing calls this directly

Calls 1

formatFunction · 0.90

Tested by

no test coverage detected