diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-12-14 12:02:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 17:02:46 +0000 |
commit | 2519beaad25d2c824129c26eab10962773e643a6 (patch) | |
tree | e4a1eb70f5d960c7edf2486a03b27bc958edde55 /tests/appservice/test_appservice.py | |
parent | Merge branch 'master' into develop (diff) | |
download | synapse-2519beaad25d2c824129c26eab10962773e643a6.tar.xz |
Add missing type hints to `synapse.appservice` (#11360)
Diffstat (limited to '')
-rw-r--r-- | tests/appservice/test_appservice.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/tests/appservice/test_appservice.py b/tests/appservice/test_appservice.py index f386b5e128..ba2a2bfd64 100644 --- a/tests/appservice/test_appservice.py +++ b/tests/appservice/test_appservice.py @@ -16,13 +16,13 @@ from unittest.mock import Mock from twisted.internet import defer -from synapse.appservice import ApplicationService +from synapse.appservice import ApplicationService, Namespace from tests import unittest -def _regex(regex, exclusive=True): - return {"regex": re.compile(regex), "exclusive": exclusive} +def _regex(regex: str, exclusive: bool = True) -> Namespace: + return Namespace(exclusive, None, re.compile(regex)) class ApplicationServiceTestCase(unittest.TestCase): @@ -33,11 +33,6 @@ class ApplicationServiceTestCase(unittest.TestCase): url="some_url", token="some_token", hostname="matrix.org", # only used by get_groups_for_user - namespaces={ - ApplicationService.NS_USERS: [], - ApplicationService.NS_ROOMS: [], - ApplicationService.NS_ALIASES: [], - }, ) self.event = Mock( type="m.something", room_id="!foo:bar", sender="@someone:somewhere" |