diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-11-09 11:00:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-09 11:00:30 -0500 |
commit | ff716b483b07b21de72d999250fdf9397003a914 (patch) | |
tree | 466db8d8885737346c41457cee9bf8fc549d387a /tests/rest/media | |
parent | Bulk-invalidate e2e cached queries after claiming keys (#16613) (diff) | |
download | synapse-ff716b483b07b21de72d999250fdf9397003a914.tar.xz |
Return attrs for more media repo APIs. (#16611)
Diffstat (limited to 'tests/rest/media')
-rw-r--r-- | tests/rest/media/test_media_retention.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/rest/media/test_media_retention.py b/tests/rest/media/test_media_retention.py index b59d9dfd4d..27a663a23b 100644 --- a/tests/rest/media/test_media_retention.py +++ b/tests/rest/media/test_media_retention.py @@ -267,23 +267,23 @@ class MediaRetentionTestCase(unittest.HomeserverTestCase): def _assert_mxc_uri_purge_state(mxc_uri: MXCUri, expect_purged: bool) -> None: """Given an MXC URI, assert whether it has been purged or not.""" if mxc_uri.server_name == self.hs.config.server.server_name: - found_media_dict = self.get_success( - self.store.get_local_media(mxc_uri.media_id) + found_media = bool( + self.get_success(self.store.get_local_media(mxc_uri.media_id)) ) else: - found_media_dict = self.get_success( - self.store.get_cached_remote_media( - mxc_uri.server_name, mxc_uri.media_id + found_media = bool( + self.get_success( + self.store.get_cached_remote_media( + mxc_uri.server_name, mxc_uri.media_id + ) ) ) if expect_purged: - self.assertIsNone( - found_media_dict, msg=f"{mxc_uri} unexpectedly not purged" - ) + self.assertFalse(found_media, msg=f"{mxc_uri} unexpectedly not purged") else: - self.assertIsNotNone( - found_media_dict, + self.assertTrue( + found_media, msg=f"{mxc_uri} unexpectedly purged", ) |