diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-02-14 14:03:35 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-14 14:03:35 -0500 |
commit | 42aea0d8af1556473b4f31f78d9facb448230a1f (patch) | |
tree | f633442e29a23705f45ca8daa148a26d12772af5 /tests/rest/client/test_shadow_banned.py | |
parent | Implement MSC3966: Add a push rule condition to search for a value in an arra... (diff) | |
download | synapse-42aea0d8af1556473b4f31f78d9facb448230a1f.tar.xz |
Add final type hint to tests.unittest. (#15072)
Adds a return type to HomeServerTestCase.make_homeserver and deal with any variables which are no longer Any.
Diffstat (limited to 'tests/rest/client/test_shadow_banned.py')
-rw-r--r-- | tests/rest/client/test_shadow_banned.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/rest/client/test_shadow_banned.py b/tests/rest/client/test_shadow_banned.py index c807a37bc2..8d2cdf8751 100644 --- a/tests/rest/client/test_shadow_banned.py +++ b/tests/rest/client/test_shadow_banned.py @@ -84,7 +84,7 @@ class RoomTestCase(_ShadowBannedBase): def test_invite_3pid(self) -> None: """Ensure that a 3PID invite does not attempt to contact the identity server.""" identity_handler = self.hs.get_identity_handler() - identity_handler.lookup_3pid = Mock( + identity_handler.lookup_3pid = Mock( # type: ignore[assignment] side_effect=AssertionError("This should not get called") ) @@ -222,7 +222,7 @@ class RoomTestCase(_ShadowBannedBase): event_source.get_new_events( user=UserID.from_string(self.other_user_id), from_key=0, - limit=None, + limit=10, room_ids=[room_id], is_guest=False, ) @@ -286,6 +286,7 @@ class ProfileTestCase(_ShadowBannedBase): self.banned_user_id, ) ) + assert event is not None self.assertEqual( event.content, {"membership": "join", "displayname": original_display_name} ) @@ -321,6 +322,7 @@ class ProfileTestCase(_ShadowBannedBase): self.banned_user_id, ) ) + assert event is not None self.assertEqual( event.content, {"membership": "join", "displayname": original_display_name} ) |