diff options
author | Sean Quah <seanq@matrix.org> | 2023-04-15 02:43:04 +0100 |
---|---|---|
committer | Sean Quah <seanq@matrix.org> | 2023-04-15 02:52:42 +0100 |
commit | 07a5623059961afc3adec4534fb24b49db1a39c4 (patch) | |
tree | 9e602119a03698af72664db26c9770d933fa2143 /tests | |
parent | De-localpart `{Filtering,FilteringWorkerStore}.get_user_filter()` (diff) | |
download | synapse-github/squah/expand_localpart_columns_1.tar.xz |
De-localpart `{Filtering,FilteringWorkerStore}.add_user_filter()` github/squah/expand_localpart_columns_1 squah/expand_localpart_columns_1
Signed-off-by: Sean Quah <seanq@matrix.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/api/test_filtering.py | 13 | ||||
-rw-r--r-- | tests/rest/client/test_filter.py | 2 |
2 files changed, 7 insertions, 8 deletions
diff --git a/tests/api/test_filtering.py b/tests/api/test_filtering.py index 48f40da176..4a55aa96a5 100644 --- a/tests/api/test_filtering.py +++ b/tests/api/test_filtering.py @@ -34,7 +34,6 @@ from tests import unittest from tests.events.test_utils import MockEvent user_id = "@test_user:test" -user_localpart = "test_user" user2_id = "@test_user2:test" @@ -439,7 +438,7 @@ class FilteringTestCase(unittest.HomeserverTestCase): user_filter_json = {"presence": {"senders": ["@foo:bar"]}} filter_id = self.get_success( self.datastore.add_user_filter( - user_localpart=user_localpart, user_filter=user_filter_json + user_id=user_id, user_filter=user_filter_json ) ) presence_states = [ @@ -467,7 +466,7 @@ class FilteringTestCase(unittest.HomeserverTestCase): filter_id = self.get_success( self.datastore.add_user_filter( - user_localpart=user_localpart + "2", user_filter=user_filter_json + user_id=user2_id, user_filter=user_filter_json ) ) presence_states = [ @@ -493,7 +492,7 @@ class FilteringTestCase(unittest.HomeserverTestCase): user_filter_json = {"room": {"state": {"types": ["m.*"]}}} filter_id = self.get_success( self.datastore.add_user_filter( - user_localpart=user_localpart, user_filter=user_filter_json + user_id=user_id, user_filter=user_filter_json ) ) event = MockEvent(sender="@foo:bar", type="m.room.topic", room_id="!foo:bar") @@ -510,7 +509,7 @@ class FilteringTestCase(unittest.HomeserverTestCase): user_filter_json = {"room": {"state": {"types": ["m.*"]}}} filter_id = self.get_success( self.datastore.add_user_filter( - user_localpart=user_localpart, user_filter=user_filter_json + user_id=user_id, user_filter=user_filter_json ) ) event = MockEvent( @@ -592,7 +591,7 @@ class FilteringTestCase(unittest.HomeserverTestCase): filter_id = self.get_success( self.filtering.add_user_filter( - user_localpart=user_localpart, user_filter=user_filter_json + user_id=user_id, user_filter=user_filter_json ) ) @@ -611,7 +610,7 @@ class FilteringTestCase(unittest.HomeserverTestCase): filter_id = self.get_success( self.datastore.add_user_filter( - user_localpart=user_localpart, user_filter=user_filter_json + user_id=user_id, user_filter=user_filter_json ) ) diff --git a/tests/rest/client/test_filter.py b/tests/rest/client/test_filter.py index 436a186f23..65eff4fe10 100644 --- a/tests/rest/client/test_filter.py +++ b/tests/rest/client/test_filter.py @@ -76,7 +76,7 @@ class FilterTestCase(unittest.HomeserverTestCase): def test_get_filter(self) -> None: filter_id = self.get_success( self.filtering.add_user_filter( - user_localpart="apple", user_filter=self.EXAMPLE_FILTER + user_id="@apple:test", user_filter=self.EXAMPLE_FILTER ) ) self.reactor.advance(1) |