diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2022-07-27 13:18:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-27 17:18:41 +0000 |
commit | 922b771337f6d14a556fa761c783748f698e924b (patch) | |
tree | 7ee9ff2cdca63b9c912c818902009870ae93a90d /tests/server.py | |
parent | Implement MSC3848: Introduce errcodes for specific event sending failures (#1... (diff) | |
download | synapse-922b771337f6d14a556fa761c783748f698e924b.tar.xz |
Add missing type hints for tests.unittest. (#13397)
Diffstat (limited to 'tests/server.py')
-rw-r--r-- | tests/server.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/server.py b/tests/server.py index df3f1564c9..9689e6a0cd 100644 --- a/tests/server.py +++ b/tests/server.py @@ -25,6 +25,7 @@ from typing import ( Callable, Dict, Iterable, + List, MutableMapping, Optional, Tuple, @@ -121,7 +122,15 @@ class FakeChannel: @property def json_body(self) -> JsonDict: - return json.loads(self.text_body) + body = json.loads(self.text_body) + assert isinstance(body, dict) + return body + + @property + def json_list(self) -> List[JsonDict]: + body = json.loads(self.text_body) + assert isinstance(body, list) + return body @property def text_body(self) -> str: |