Skip to content

Commit

Permalink
Add tests for iso_year and iso_week_day
Browse files Browse the repository at this point in the history
  • Loading branch information
ababic committed Feb 22, 2024
1 parent a2b1dc3 commit 2702626
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/tests/test_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,15 @@ def test_date_filters(self):
"one person died"
)

self.assertEqual(
tmbg.albums.get(release_date__iso_year='1994').name,
"John Henry"
)
self.assertEqual(
logs.get(time__iso_year=1980).data,
"one person died"
)

self.assertEqual(
tmbg.albums.get(release_date__month=7).name,
"John Henry"
Expand Down Expand Up @@ -595,6 +604,15 @@ def test_date_filters(self):
"one person died"
)

self.assertEqual(
tmbg.albums.get(release_date__iso_week_day=4).name,
"John Henry"
)
self.assertEqual(
logs.get(time__iso_week_day=6).data,
"one person died"
)

self.assertEqual(
tmbg.albums.get(release_date__quarter=3).name,
"John Henry"
Expand Down

0 comments on commit 2702626

Please sign in to comment.