diff --git a/search/tests/test_timer.py b/search/tests/test_timer.py index 74e5056b..8ed76ab5 100644 --- a/search/tests/test_timer.py +++ b/search/tests/test_timer.py @@ -1,7 +1,8 @@ +import datetime + from django.test import TestCase from search.utils import Timer -import datetime class TimerTest(TestCase): @@ -13,7 +14,7 @@ def test_start_timer(self): self.assertTrue(timer.end_time is not None) def test_elapsed_time(self): - start = datetime.datetime(2024, 1, 0, 0, 0, 0, 0) + start = datetime.datetime(2024, 1, 1, 0, 0, 0, 0) end = start + datetime.timedelta(seconds=5) timer = Timer() @@ -25,7 +26,7 @@ def test_elapsed_time(self): self.assertEqual(timer.end_time, end) def test_elapsed_time_string(self): - start = datetime.datetime(2024, 1, 0, 0, 0, 0, 0) + start = datetime.datetime(2024, 1, 1, 0, 0, 0, 0) end = start + datetime.timedelta(seconds=5) timer = Timer() @@ -34,4 +35,4 @@ def test_elapsed_time_string(self): self.assertEqual(timer.elapsed_time, 5) self.assertEqual(timer.start_time_string, "2024-01-01T00:00:00") - self.assertEqual(timer.end_time_string, "2024-01-01T00:00:05") \ No newline at end of file + self.assertEqual(timer.end_time_string, "2024-01-01T00:00:05")