fix some issues uncovered during testing

This commit is contained in:
Kenneth Kehl
2023-05-01 13:26:19 -07:00
parent b16883e989
commit be04edd04a
7 changed files with 16 additions and 21 deletions

View File

@@ -219,9 +219,11 @@ def test_persist_notification_increments_cache_for_trial_or_live_service(
reference="ref2")
assert mock_incr.call_count == 2
mock_incr.assert_has_calls([
call(str(service.id) + "-2016-01-01-count", ),
call("2016-01-01-total", )
call(str(service.id) + "-2016-01-01-total-count", ),
])
@@ -250,7 +252,8 @@ def test_persist_notification_sets_daily_limit_cache_if_one_does_not_exists(
assert mock_set.call_count == 2
mock_set.assert_has_calls([
call(str(service.id) + "-2016-01-01-count", 1, ex=86400),
call("2016-01-01-total", 1, ex=86400)
call(str(service.id) + "-2016-01-01-total-count", 1, ex=86400),
])