Skip to content

Commit

Permalink
fix test (#2347)
Browse files Browse the repository at this point in the history
  • Loading branch information
jzbahrai authored Nov 8, 2024
1 parent c321472 commit 6fbb101
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions tests/app/dao/test_fact_notification_status_dao.py
Original file line number Diff line number Diff line change
Expand Up @@ -1358,10 +1358,12 @@ def test_fetch_quarter_data(self, notify_db_session):
create_ft_notification_status(date(2018, 3, 20), "sms", service_2, count=100)
create_ft_notification_status(date(2018, 2, 1), "sms", service_2, count=1000)

assert fetch_quarter_data(date(2018, 1, 1), date(2018, 3, 27), service_ids=[service_1.id, service_2.id]) == [
(service_1.id, "sms", 4),
(service_2.id, "sms", 1100),
]
assert fetch_quarter_data(date(2018, 4, 1), date(2018, 6, 30), service_ids=[service_1.id, service_2.id]) == [
(service_1.id, "sms", 10)
]
assert set(fetch_quarter_data(date(2018, 1, 1), date(2018, 3, 27), service_ids=[service_1.id, service_2.id])) == set(
[
(service_1.id, "sms", 4),
(service_2.id, "sms", 1100),
]
)
assert set(fetch_quarter_data(date(2018, 4, 1), date(2018, 6, 30), service_ids=[service_1.id, service_2.id])) == set(
[(service_1.id, "sms", 10)]
)

0 comments on commit 6fbb101

Please sign in to comment.