summary refs log tree commit diff
path: root/tests/rest
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2022-03-29 22:37:50 +0100
committerGitHub <noreply@github.com>2022-03-29 21:37:50 +0000
commite0bb2681340752f2716f1f386139ca37c53f26cd (patch)
treec60634aa76eb05611b7371e6a4916ebc782707b7 /tests/rest
parentRoom batch: fix up handling of unknown prev_event_ids (#12316) (diff)
downloadsynapse-e0bb2681340752f2716f1f386139ca37c53f26cd.tar.xz
Fix typechecker problems exposed by signedjson 1.1.2 (#12326)
Diffstat (limited to 'tests/rest')
-rw-r--r--tests/rest/key/v2/test_remote_key_resource.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/rest/key/v2/test_remote_key_resource.py b/tests/rest/key/v2/test_remote_key_resource.py

index 978c252f84..ac0ac06b7e 100644 --- a/tests/rest/key/v2/test_remote_key_resource.py +++ b/tests/rest/key/v2/test_remote_key_resource.py
@@ -76,7 +76,7 @@ class BaseRemoteKeyResourceTestCase(unittest.HomeserverTestCase): "verify_keys": { key_id: { "key": signedjson.key.encode_verify_key_base64( - signing_key.verify_key + signedjson.key.get_verify_key(signing_key) ) } }, @@ -175,7 +175,7 @@ class EndToEndPerspectivesTests(BaseRemoteKeyResourceTestCase): % ( self.hs_signing_key.version, ): signedjson.key.encode_verify_key_base64( - self.hs_signing_key.verify_key + signedjson.key.get_verify_key(self.hs_signing_key) ) }, } @@ -229,7 +229,9 @@ class EndToEndPerspectivesTests(BaseRemoteKeyResourceTestCase): assert isinstance(keyres, FetchKeyResult) self.assertEqual( signedjson.key.encode_verify_key_base64(keyres.verify_key), - signedjson.key.encode_verify_key_base64(testkey.verify_key), + signedjson.key.encode_verify_key_base64( + signedjson.key.get_verify_key(testkey) + ), ) def test_get_notary_key(self) -> None: @@ -251,7 +253,9 @@ class EndToEndPerspectivesTests(BaseRemoteKeyResourceTestCase): assert isinstance(keyres, FetchKeyResult) self.assertEqual( signedjson.key.encode_verify_key_base64(keyres.verify_key), - signedjson.key.encode_verify_key_base64(testkey.verify_key), + signedjson.key.encode_verify_key_base64( + signedjson.key.get_verify_key(testkey) + ), ) def test_get_notary_keyserver_key(self) -> None: @@ -268,5 +272,7 @@ class EndToEndPerspectivesTests(BaseRemoteKeyResourceTestCase): assert isinstance(keyres, FetchKeyResult) self.assertEqual( signedjson.key.encode_verify_key_base64(keyres.verify_key), - signedjson.key.encode_verify_key_base64(self.hs_signing_key.verify_key), + signedjson.key.encode_verify_key_base64( + signedjson.key.get_verify_key(self.hs_signing_key) + ), )