store: Split out the media cache loading logic from the load media method

This commit is contained in:
Damir Jelić 2021-05-17 10:36:52 +02:00
parent 90cdc55451
commit 2b359c22d2
3 changed files with 25 additions and 23 deletions

View file

@ -153,7 +153,7 @@ class TestClass(object):
def test_media_storage(self, panstore):
server_name = "test"
media_cache = panstore.load_media(server_name)
media_cache = panstore.load_media_cache(server_name)
assert not media_cache
event = self.encrypted_media_event
@ -171,7 +171,7 @@ class TestClass(object):
panstore.save_media(server_name, media)
media_cache = panstore.load_media(server_name)
media_cache = panstore.load_media_cache(server_name)
assert (mxc_server, mxc_path) in media_cache
media_info = media_cache[(mxc_server, mxc_path)]