mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-01-23 13:51:15 -05:00
fix test
This commit is contained in:
parent
404dfe568c
commit
3a380cc91e
@ -182,12 +182,12 @@ class PanStore:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
@use_database
|
@use_database
|
||||||
def save_upload(self, content_uri, media):
|
def save_upload(self, content_uri, upload):
|
||||||
PanUploadInfo.insert(
|
PanUploadInfo.insert(
|
||||||
content_uri=content_uri,
|
content_uri=content_uri,
|
||||||
key=media["key"],
|
key=upload["key"],
|
||||||
iv=media["iv"],
|
iv=upload["iv"],
|
||||||
hashes=media["hashes"],
|
hashes=upload["hashes"],
|
||||||
).on_conflict_ignore().execute()
|
).on_conflict_ignore().execute()
|
||||||
|
|
||||||
@use_database
|
@use_database
|
||||||
|
@ -185,7 +185,7 @@ class TestClass(object):
|
|||||||
|
|
||||||
upload = UploadInfo(event.url, event.key, event.iv, event.hashes)
|
upload = UploadInfo(event.url, event.key, event.iv, event.hashes)
|
||||||
|
|
||||||
panstore.save_upload(event.url)
|
panstore.save_upload(event.url, {"key": event.key, "iv": event.iv, "hashes": event.hashes})
|
||||||
|
|
||||||
upload_cache = panstore.load_upload(event.url)
|
upload_cache = panstore.load_upload(event.url)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user