Replace assertEquals and friends with non-deprecated versions. (#12092)

This commit is contained in:
Patrick Cloke 2022-02-28 07:12:29 -05:00 committed by GitHub
parent ab3ef49059
commit 02d708568b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
62 changed files with 888 additions and 889 deletions

View file

@ -169,7 +169,7 @@ class KnockingStrippedStateEventHelperMixin(TestCase):
self.assertIn(event_type, expected_room_state)
# Check the state content matches
self.assertEquals(
self.assertEqual(
expected_room_state[event_type]["content"], event["content"]
)
@ -256,7 +256,7 @@ class FederationKnockingTestCase(
RoomVersions.V7.identifier,
),
)
self.assertEquals(200, channel.code, channel.result)
self.assertEqual(200, channel.code, channel.result)
# Note: We don't expect the knock membership event to be sent over federation as
# part of the stripped room state, as the knocking homeserver already has that
@ -266,11 +266,11 @@ class FederationKnockingTestCase(
knock_event = channel.json_body["event"]
# Check that the event has things we expect in it
self.assertEquals(knock_event["room_id"], room_id)
self.assertEquals(knock_event["sender"], fake_knocking_user_id)
self.assertEquals(knock_event["state_key"], fake_knocking_user_id)
self.assertEquals(knock_event["type"], EventTypes.Member)
self.assertEquals(knock_event["content"]["membership"], Membership.KNOCK)
self.assertEqual(knock_event["room_id"], room_id)
self.assertEqual(knock_event["sender"], fake_knocking_user_id)
self.assertEqual(knock_event["state_key"], fake_knocking_user_id)
self.assertEqual(knock_event["type"], EventTypes.Member)
self.assertEqual(knock_event["content"]["membership"], Membership.KNOCK)
# Turn the event json dict into a proper event.
# We won't sign it properly, but that's OK as we stub out event auth in `prepare`
@ -294,7 +294,7 @@ class FederationKnockingTestCase(
% (room_id, signed_knock_event.event_id),
signed_knock_event_json,
)
self.assertEquals(200, channel.code, channel.result)
self.assertEqual(200, channel.code, channel.result)
# Check that we got the stripped room state in return
room_state_events = channel.json_body["knock_state_events"]