diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2022-02-28 07:12:29 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-28 07:12:29 -0500 |
commit | 02d708568b476f2f7716000b35c0adfa4cbd31b3 (patch) | |
tree | d44cb17a2890502805100df3b93f20c003b56cf1 /tests/storage/databases | |
parent | synctl: print warning if synctl_cache_factor is set in config (#11865) (diff) | |
download | synapse-02d708568b476f2f7716000b35c0adfa4cbd31b3.tar.xz |
Replace assertEquals and friends with non-deprecated versions. (#12092)
Diffstat (limited to 'tests/storage/databases')
-rw-r--r-- | tests/storage/databases/main/test_events_worker.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/storage/databases/main/test_events_worker.py b/tests/storage/databases/main/test_events_worker.py index 59def6e59c..1f6a9eb07b 100644 --- a/tests/storage/databases/main/test_events_worker.py +++ b/tests/storage/databases/main/test_events_worker.py @@ -88,18 +88,18 @@ class HaveSeenEventsTestCase(unittest.HomeserverTestCase): res = self.get_success( self.store.have_seen_events("room1", ["event10", "event19"]) ) - self.assertEquals(res, {"event10"}) + self.assertEqual(res, {"event10"}) # that should result in a single db query - self.assertEquals(ctx.get_resource_usage().db_txn_count, 1) + self.assertEqual(ctx.get_resource_usage().db_txn_count, 1) # a second lookup of the same events should cause no queries with LoggingContext(name="test") as ctx: res = self.get_success( self.store.have_seen_events("room1", ["event10", "event19"]) ) - self.assertEquals(res, {"event10"}) - self.assertEquals(ctx.get_resource_usage().db_txn_count, 0) + self.assertEqual(res, {"event10"}) + self.assertEqual(ctx.get_resource_usage().db_txn_count, 0) def test_query_via_event_cache(self): # fetch an event into the event cache @@ -108,8 +108,8 @@ class HaveSeenEventsTestCase(unittest.HomeserverTestCase): # looking it up should now cause no db hits with LoggingContext(name="test") as ctx: res = self.get_success(self.store.have_seen_events("room1", ["event10"])) - self.assertEquals(res, {"event10"}) - self.assertEquals(ctx.get_resource_usage().db_txn_count, 0) + self.assertEqual(res, {"event10"}) + self.assertEqual(ctx.get_resource_usage().db_txn_count, 0) class EventCacheTestCase(unittest.HomeserverTestCase): |