summary refs log tree commit diff
path: root/tests/appservice
diff options
context:
space:
mode:
authorOlivier Wilkinson (reivilibre) <oliverw@matrix.org>2022-10-28 15:59:51 +0100
committerOlivier Wilkinson (reivilibre) <oliverw@matrix.org>2022-10-28 15:59:51 +0100
commit1335367ca7014a2245f57c13d17885f35283270e (patch)
treef2e7a7904fc1aa832be1db950065d3ce7ffac2c2 /tests/appservice
parentAdd docs for an empty `trusted_key_servers` config option (#13999) (diff)
parentTweak changelog (diff)
downloadsynapse-1335367ca7014a2245f57c13d17885f35283270e.tar.xz
Merge branch 'master' into develop
Diffstat (limited to 'tests/appservice')
-rw-r--r--tests/appservice/test_api.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/appservice/test_api.py b/tests/appservice/test_api.py
index 11008ac1fb..89ee79396f 100644
--- a/tests/appservice/test_api.py
+++ b/tests/appservice/test_api.py
@@ -11,7 +11,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-from typing import Any, List, Mapping
+from typing import Any, List, Mapping, Sequence, Union
 from unittest.mock import Mock
 
 from twisted.test.proto_helpers import MemoryReactor
@@ -70,13 +70,15 @@ class ApplicationServiceApiTestCase(unittest.HomeserverTestCase):
         self.request_url = None
 
         async def get_json(
-            url: str, args: Mapping[Any, Any], headers: Mapping[Any, Any]
+            url: str,
+            args: Mapping[Any, Any],
+            headers: Mapping[Union[str, bytes], Sequence[Union[str, bytes]]],
         ) -> List[JsonDict]:
             # Ensure the access token is passed as both a header and query arg.
             if not headers.get("Authorization") or not args.get(b"access_token"):
                 raise RuntimeError("Access token not provided")
 
-            self.assertEqual(headers.get("Authorization"), f"Bearer {TOKEN}")
+            self.assertEqual(headers.get("Authorization"), [f"Bearer {TOKEN}"])
             self.assertEqual(args.get(b"access_token"), TOKEN)
             self.request_url = url
             if url == URL_USER: