summary refs log tree commit diff
path: root/tests/storage/test_state.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2021-04-23 18:25:38 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2021-04-23 18:25:38 +0100
commit69d83ca0f099bc2ce7a78d69fdaa1fb7ad30b099 (patch)
treee8a5109643abf6407a233dc78fa7988a619b807f /tests/storage/test_state.py
parentMerge commit 'c6f8e8086' into anoa/dinsic_release_1_31_0 (diff)
parent 1.31.0rc1 (diff)
downloadsynapse-69d83ca0f099bc2ce7a78d69fdaa1fb7ad30b099.tar.xz
Merge commit '78e48f61b' into anoa/dinsic_release_1_31_0
Diffstat (limited to 'tests/storage/test_state.py')
-rw-r--r--tests/storage/test_state.py22
1 files changed, 8 insertions, 14 deletions
diff --git a/tests/storage/test_state.py b/tests/storage/test_state.py

index 8bd12fa847..2471f1267d 100644 --- a/tests/storage/test_state.py +++ b/tests/storage/test_state.py
@@ -377,14 +377,11 @@ class StateStoreTestCase(tests.unittest.TestCase): ####################################################### # deliberately remove e2 (room name) from the _state_group_cache - ( - is_all, - known_absent, - state_dict_ids, - ) = self.state_datastore._state_group_cache.get(group) + cache_entry = self.state_datastore._state_group_cache.get(group) + state_dict_ids = cache_entry.value - self.assertEqual(is_all, True) - self.assertEqual(known_absent, set()) + self.assertEqual(cache_entry.full, True) + self.assertEqual(cache_entry.known_absent, set()) self.assertDictEqual( state_dict_ids, { @@ -403,14 +400,11 @@ class StateStoreTestCase(tests.unittest.TestCase): fetched_keys=((e1.type, e1.state_key),), ) - ( - is_all, - known_absent, - state_dict_ids, - ) = self.state_datastore._state_group_cache.get(group) + cache_entry = self.state_datastore._state_group_cache.get(group) + state_dict_ids = cache_entry.value - self.assertEqual(is_all, False) - self.assertEqual(known_absent, {(e1.type, e1.state_key)}) + self.assertEqual(cache_entry.full, False) + self.assertEqual(cache_entry.known_absent, {(e1.type, e1.state_key)}) self.assertDictEqual(state_dict_ids, {(e1.type, e1.state_key): e1.event_id}) ############################################