diff options
author | 2022-07-23 22:52:52 +0100 | |
---|---|---|
committer | 2022-08-14 19:43:52 +0100 | |
commit | 7782c196830098f81f39d235354636cd0d4a481d (patch) | |
tree | 68ffeec0c351449940b2dd4c7349b4458d65cda2 /tests | |
parent | redis-py breaking changes (diff) |
No longer use the removed RedisSession connection object
This has been abstracted away, the correct way to do this now is to directly access the client.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bot/exts/moderation/test_incidents.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/bot/exts/moderation/test_incidents.py b/tests/bot/exts/moderation/test_incidents.py index cfe0c4b03..f60c177c5 100644 --- a/tests/bot/exts/moderation/test_incidents.py +++ b/tests/bot/exts/moderation/test_incidents.py @@ -283,8 +283,7 @@ class TestIncidents(unittest.IsolatedAsyncioTestCase): async def flush(self): """Flush everything from the database to prevent carry-overs between tests.""" - with await self.session.pool as connection: - await connection.flushall() + await self.session.client.flushall() async def asyncSetUp(self): # noqa: N802 self.session = RedisSession(use_fakeredis=True) @@ -293,7 +292,7 @@ class TestIncidents(unittest.IsolatedAsyncioTestCase): async def asyncTearDown(self): # noqa: N802 if self.session: - await self.session.close() + await self.session.client.close() def setUp(self): """ |