Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnuon committed Jan 4, 2024
1 parent c2855a2 commit 1d249de
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions search/tests/test_timer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import datetime

from django.test import TestCase
from search.utils import Timer

import datetime

class TimerTest(TestCase):

Expand All @@ -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()
Expand All @@ -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()
Expand All @@ -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")
self.assertEqual(timer.end_time_string, "2024-01-01T00:00:05")

0 comments on commit 1d249de

Please sign in to comment.