Split out profile handler to fix tests

This commit is contained in:
Erik Johnston 2017-08-25 14:34:56 +01:00
parent 27ebc5c8f2
commit bf81f3cf2c
11 changed files with 35 additions and 29 deletions

View file

@ -46,6 +46,7 @@ class ProfileTestCase(unittest.TestCase):
resource_for_client=self.mock_resource,
federation=Mock(),
replication_layer=Mock(),
profile_handler=self.mock_handler
)
def _get_user_by_req(request=None, allow_guest=False):
@ -53,8 +54,6 @@ class ProfileTestCase(unittest.TestCase):
hs.get_v1auth().get_user_by_req = _get_user_by_req
hs.get_handlers().profile_handler = self.mock_handler
profile.register_servlets(hs, self.mock_resource)
@defer.inlineCallbacks