diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2022-04-01 13:48:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-01 12:48:08 +0000 |
commit | b7762b0c9f007e92a5b6a29add1c7f1603431889 (patch) | |
tree | 1a913930faff3d4102d8dd2ad7ac68b87c61b7e9 /tests/unittest.py | |
parent | Move `update_client_ip` background job from the main process to the backgroun... (diff) | |
download | synapse-b7762b0c9f007e92a5b6a29add1c7f1603431889.tar.xz |
Move single-use methods out of `TestCase` (#12348)
These methods are only used by a single testcase, so they shouldn't be cluttering up the base `TestCase` class.
Diffstat (limited to 'tests/unittest.py')
-rw-r--r-- | tests/unittest.py | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/tests/unittest.py b/tests/unittest.py index 326895f4c9..cbe215ee83 100644 --- a/tests/unittest.py +++ b/tests/unittest.py @@ -717,33 +717,6 @@ class HomeserverTestCase(TestCase): return event.event_id - def add_extremity(self, room_id, event_id): - """ - Add the given event as an extremity to the room. - """ - self.get_success( - self.hs.get_datastores().main.db_pool.simple_insert( - table="event_forward_extremities", - values={"room_id": room_id, "event_id": event_id}, - desc="test_add_extremity", - ) - ) - - self.hs.get_datastores().main.get_latest_event_ids_in_room.invalidate( - (room_id,) - ) - - def attempt_wrong_password_login(self, username, password): - """Attempts to login as the user with the given password, asserting - that the attempt *fails*. - """ - body = {"type": "m.login.password", "user": username, "password": password} - - channel = self.make_request( - "POST", "/_matrix/client/r0/login", json.dumps(body).encode("utf8") - ) - self.assertEqual(channel.code, 403, channel.result) - def inject_room_member(self, room: str, user: str, membership: Membership) -> None: """ Inject a membership event into a room. |