File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ def test_get_campaign_configs_uses_cache_within_ttl(
6666 assert mock_s3_client .list_objects .call_count == 1
6767 assert mock_s3_client .get_object .call_count == 1
6868
69- def test_get_campaign_configs_refreshes_after_ttl_expiry (
69+ def test_get_campaign_configs_refreshes_after_cache_is_cleared (
7070 self ,
7171 repo ,
7272 mock_s3_client ,
@@ -85,8 +85,10 @@ def test_get_campaign_configs_refreshes_after_ttl_expiry(
8585 campaign_config_cache .clear ()
8686 third = list (repo .get_campaign_configs ("test-consumer-1" ))
8787
88- assert first [0 ].version == 1
89- assert second [0 ].version == 1
90- assert third [0 ].version == 2
91- assert mock_s3_client .list_objects .call_count == 2
92- assert mock_s3_client .get_object .call_count == 2
88+ expected_call_count = 2
89+
90+ assert first [0 ].version == first_config .version
91+ assert second [0 ].version == first_config .version
92+ assert third [0 ].version == second_config .version
93+ assert mock_s3_client .list_objects .call_count == expected_call_count
94+ assert mock_s3_client .get_object .call_count == expected_call_count
You can’t perform that action at this time.
0 commit comments