summary refs log tree commit diff
path: root/tests/appservice/test_appservice.py
diff options
context:
space:
mode:
authorEric Eastwood <erice@element.io>2021-12-15 22:38:29 -0600
committerEric Eastwood <erice@element.io>2021-12-15 22:38:29 -0600
commit1d0004312a3c77869808d7bd30b21c4e5c1572a8 (patch)
tree62ebebe9f7809bc0358447268debeed3127587ad /tests/appservice/test_appservice.py
parentMerge branch 'develop' into madlittlemods/return-historical-events-in-order-f... (diff)
parentAdd type hints to `synapse/storage/databases/main/room.py` (#11575) (diff)
downloadsynapse-1d0004312a3c77869808d7bd30b21c4e5c1572a8.tar.xz
Merge branch 'develop' into madlittlemods/return-historical-events-in-order-from-backfill
Conflicts:
	synapse/handlers/message.py
	synapse/handlers/room_member.py
Diffstat (limited to 'tests/appservice/test_appservice.py')
-rw-r--r--tests/appservice/test_appservice.py11
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"