diff options
author | Olivier Wilkinson (reivilibre) <olivier@librepush.net> | 2021-08-05 16:28:10 +0100 |
---|---|---|
committer | Olivier Wilkinson (reivilibre) <olivier@librepush.net> | 2021-08-05 16:28:10 +0100 |
commit | 4bb7bc8ffdd1ac12d51282c6def6c9d82a2d76a8 (patch) | |
tree | 75ba86a858adf1f5af3e8881fe454a6c66955186 | |
parent | Merge remote-tracking branch 'origin/develop' into rei/gsgfg (diff) | |
download | synapse-4bb7bc8ffdd1ac12d51282c6def6c9d82a2d76a8.tar.xz |
Fix up type checking and ENABLE THE FILE :)
-rw-r--r-- | mypy.ini | 1 | ||||
-rw-r--r-- | tests/storage/test_state.py | 26 |
2 files changed, 14 insertions, 13 deletions
diff --git a/mypy.ini b/mypy.ini index 8717ae738e..029a071bf5 100644 --- a/mypy.ini +++ b/mypy.ini @@ -88,6 +88,7 @@ files = tests/handlers/test_password_providers.py, tests/rest/client/v1/test_login.py, tests/rest/client/v2_alpha/test_auth.py, + tests/storage/test_state.py, tests/util/test_itertools.py, tests/util/test_stream_change_cache.py diff --git a/tests/storage/test_state.py b/tests/storage/test_state.py index d5e9e850a9..5be9b19926 100644 --- a/tests/storage/test_state.py +++ b/tests/storage/test_state.py @@ -185,7 +185,7 @@ class StateStoreTestCase(HomeserverTestCase): self.storage.state.get_state_for_event( e5.event_id, state_filter=StateFilter( - types=frozendict({EventTypes.Member: {self.u_alice.to_string()}}), + types=frozendict({EventTypes.Member: frozenset({self.u_alice.to_string()})}), include_others=True, ), ) @@ -205,7 +205,7 @@ class StateStoreTestCase(HomeserverTestCase): self.storage.state.get_state_for_event( e5.event_id, state_filter=StateFilter( - types=frozendict({EventTypes.Member: set()}), include_others=True + types=frozendict({EventTypes.Member: frozenset()}), include_others=True ), ) ) @@ -230,7 +230,7 @@ class StateStoreTestCase(HomeserverTestCase): self.state_datastore._state_group_cache, group, state_filter=StateFilter( - types=frozendict({EventTypes.Member: set()}), include_others=True + types=frozendict({EventTypes.Member: frozenset()}), include_others=True ), ) @@ -247,7 +247,7 @@ class StateStoreTestCase(HomeserverTestCase): self.state_datastore._state_group_members_cache, group, state_filter=StateFilter( - types=frozendict({EventTypes.Member: set()}), include_others=True + types=frozendict({EventTypes.Member: frozenset()}), include_others=True ), ) @@ -297,7 +297,7 @@ class StateStoreTestCase(HomeserverTestCase): self.state_datastore._state_group_cache, group, state_filter=StateFilter( - types=frozendict({EventTypes.Member: {e5.state_key}}), + types=frozendict({EventTypes.Member: frozenset({e5.state_key})}), include_others=True, ), ) @@ -315,7 +315,7 @@ class StateStoreTestCase(HomeserverTestCase): self.state_datastore._state_group_members_cache, group, state_filter=StateFilter( - types=frozendict({EventTypes.Member: {e5.state_key}}), + types=frozendict({EventTypes.Member: frozenset({e5.state_key})}), include_others=True, ), ) @@ -329,7 +329,7 @@ class StateStoreTestCase(HomeserverTestCase): self.state_datastore._state_group_members_cache, group, state_filter=StateFilter( - types=frozendict({EventTypes.Member: {e5.state_key}}), + types=frozendict({EventTypes.Member: frozenset({e5.state_key})}), include_others=False, ), ) @@ -380,7 +380,7 @@ class StateStoreTestCase(HomeserverTestCase): self.state_datastore._state_group_cache, group, state_filter=StateFilter( - types=frozendict({EventTypes.Member: set()}), include_others=True + types=frozendict({EventTypes.Member: frozenset()}), include_others=True ), ) @@ -392,7 +392,7 @@ class StateStoreTestCase(HomeserverTestCase): self.state_datastore._state_group_members_cache, group, state_filter=StateFilter( - types=frozendict({EventTypes.Member: set()}), include_others=True + types=frozendict({EventTypes.Member: frozenset()}), include_others=True ), ) @@ -435,7 +435,7 @@ class StateStoreTestCase(HomeserverTestCase): self.state_datastore._state_group_cache, group, state_filter=StateFilter( - types=frozendict({EventTypes.Member: {e5.state_key}}), + types=frozendict({EventTypes.Member: frozenset({e5.state_key})}), include_others=True, ), ) @@ -447,7 +447,7 @@ class StateStoreTestCase(HomeserverTestCase): self.state_datastore._state_group_members_cache, group, state_filter=StateFilter( - types=frozendict({EventTypes.Member: {e5.state_key}}), + types=frozendict({EventTypes.Member: frozenset({e5.state_key})}), include_others=True, ), ) @@ -461,7 +461,7 @@ class StateStoreTestCase(HomeserverTestCase): self.state_datastore._state_group_cache, group, state_filter=StateFilter( - types=frozendict({EventTypes.Member: {e5.state_key}}), + types=frozendict({EventTypes.Member: frozenset({e5.state_key})}), include_others=False, ), ) @@ -473,7 +473,7 @@ class StateStoreTestCase(HomeserverTestCase): self.state_datastore._state_group_members_cache, group, state_filter=StateFilter( - types=frozendict({EventTypes.Member: {e5.state_key}}), + types=frozendict({EventTypes.Member: frozenset({e5.state_key})}), include_others=False, ), ) |