File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
api/tests/unit/environments Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1059,9 +1059,14 @@ def test_change_api_key_updates_environment_document_cache(
10591059
10601060 # Then
10611061 persistent_environment_document_cache .delete .assert_called_once_with (old_api_key )
1062- persistent_environment_document_cache .set_many .assert_called_once_with (
1063- {new_api_key : map_environment_to_environment_document (environment )}
1064- )
1062+ persistent_environment_document_cache .set_many .assert_called_once ()
1063+
1064+ # Get what was actually cached and compare to sdk document
1065+ cache_payload = persistent_environment_document_cache .set_many .call_args [0 ][0 ]
1066+ cached_document = cache_payload [new_api_key ]
1067+ expected_document = map_environment_to_sdk_document (environment )
1068+
1069+ assert cached_document == expected_document
10651070
10661071
10671072def test_get_environment_document_from_cache_triggers_correct_metrics__cache_hit (
You can’t perform that action at this time.
0 commit comments