summary refs log tree commit diff
path: root/tests/federation/test_complexity.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2023-08-29 10:38:56 -0400
committerGitHub <noreply@github.com>2023-08-29 10:38:56 -0400
commit9ec3da06daf70b5e799545a6e12ead4846559d80 (patch)
tree393bfe5aab9efcb26adc0a985626527a750a9783 /tests/federation/test_complexity.py
parentBump ruff from 0.0.277 to 0.0.286 (#16198) (diff)
downloadsynapse-9ec3da06daf70b5e799545a6e12ead4846559d80.tar.xz
Bump mypy-zope & mypy. (#16188)
Diffstat (limited to 'tests/federation/test_complexity.py')
-rw-r--r--tests/federation/test_complexity.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/federation/test_complexity.py b/tests/federation/test_complexity.py
index 5b58fb13b5..73a2766baf 100644
--- a/tests/federation/test_complexity.py
+++ b/tests/federation/test_complexity.py
@@ -57,7 +57,7 @@ class RoomComplexityTests(unittest.FederatingHomeserverTestCase):
         async def get_current_state_event_counts(room_id: str) -> int:
             return int(500 * 1.23)
 
-        store.get_current_state_event_counts = get_current_state_event_counts  # type: ignore[assignment]
+        store.get_current_state_event_counts = get_current_state_event_counts  # type: ignore[method-assign]
 
         # Get the room complexity again -- make sure it's our artificial value
         channel = self.make_signed_federation_request(
@@ -74,8 +74,8 @@ class RoomComplexityTests(unittest.FederatingHomeserverTestCase):
         fed_transport = self.hs.get_federation_transport_client()
 
         # Mock out some things, because we don't want to test the whole join
-        fed_transport.client.get_json = AsyncMock(return_value={"v1": 9999})  # type: ignore[assignment]
-        handler.federation_handler.do_invite_join = AsyncMock(  # type: ignore[assignment]
+        fed_transport.client.get_json = AsyncMock(return_value={"v1": 9999})  # type: ignore[method-assign]
+        handler.federation_handler.do_invite_join = AsyncMock(  # type: ignore[method-assign]
             return_value=("", 1)
         )
 
@@ -105,8 +105,8 @@ class RoomComplexityTests(unittest.FederatingHomeserverTestCase):
         fed_transport = self.hs.get_federation_transport_client()
 
         # Mock out some things, because we don't want to test the whole join
-        fed_transport.client.get_json = AsyncMock(return_value={"v1": 9999})  # type: ignore[assignment]
-        handler.federation_handler.do_invite_join = AsyncMock(  # type: ignore[assignment]
+        fed_transport.client.get_json = AsyncMock(return_value={"v1": 9999})  # type: ignore[method-assign]
+        handler.federation_handler.do_invite_join = AsyncMock(  # type: ignore[method-assign]
             return_value=("", 1)
         )
 
@@ -142,8 +142,8 @@ class RoomComplexityTests(unittest.FederatingHomeserverTestCase):
         fed_transport = self.hs.get_federation_transport_client()
 
         # Mock out some things, because we don't want to test the whole join
-        fed_transport.client.get_json = AsyncMock(return_value=None)  # type: ignore[assignment]
-        handler.federation_handler.do_invite_join = AsyncMock(  # type: ignore[assignment]
+        fed_transport.client.get_json = AsyncMock(return_value=None)  # type: ignore[method-assign]
+        handler.federation_handler.do_invite_join = AsyncMock(  # type: ignore[method-assign]
             return_value=("", 1)
         )
 
@@ -151,7 +151,7 @@ class RoomComplexityTests(unittest.FederatingHomeserverTestCase):
         async def get_current_state_event_counts(room_id: str) -> int:
             return 600
 
-        self.hs.get_datastores().main.get_current_state_event_counts = get_current_state_event_counts  # type: ignore[assignment]
+        self.hs.get_datastores().main.get_current_state_event_counts = get_current_state_event_counts  # type: ignore[method-assign]
 
         d = handler._remote_join(
             create_requester(u1),
@@ -199,8 +199,8 @@ class RoomComplexityAdminTests(unittest.FederatingHomeserverTestCase):
         fed_transport = self.hs.get_federation_transport_client()
 
         # Mock out some things, because we don't want to test the whole join
-        fed_transport.client.get_json = AsyncMock(return_value={"v1": 9999})  # type: ignore[assignment]
-        handler.federation_handler.do_invite_join = AsyncMock(  # type: ignore[assignment]
+        fed_transport.client.get_json = AsyncMock(return_value={"v1": 9999})  # type: ignore[method-assign]
+        handler.federation_handler.do_invite_join = AsyncMock(  # type: ignore[method-assign]
             return_value=("", 1)
         )
 
@@ -229,8 +229,8 @@ class RoomComplexityAdminTests(unittest.FederatingHomeserverTestCase):
         fed_transport = self.hs.get_federation_transport_client()
 
         # Mock out some things, because we don't want to test the whole join
-        fed_transport.client.get_json = AsyncMock(return_value={"v1": 9999})  # type: ignore[assignment]
-        handler.federation_handler.do_invite_join = AsyncMock(  # type: ignore[assignment]
+        fed_transport.client.get_json = AsyncMock(return_value={"v1": 9999})  # type: ignore[method-assign]
+        handler.federation_handler.do_invite_join = AsyncMock(  # type: ignore[method-assign]
             return_value=("", 1)
         )