diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2016-07-26 16:57:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-26 16:57:53 +0100 |
commit | 2452611d0f0163e7b9c531b48fce11a6dc7e1537 (patch) | |
tree | d2067b5f2fbfcc69f7303c3fa567082a5d9469b6 /tests/rest/client/v1/test_profile.py | |
parent | Fix typo (diff) | |
parent | Add `create_requester` function (diff) | |
download | synapse-2452611d0f0163e7b9c531b48fce11a6dc7e1537.tar.xz |
Merge pull request #953 from matrix-org/rav/requester
Add `create_requester` function
Diffstat (limited to 'tests/rest/client/v1/test_profile.py')
-rw-r--r-- | tests/rest/client/v1/test_profile.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/rest/client/v1/test_profile.py b/tests/rest/client/v1/test_profile.py index af02fce8fb..1e95e97538 100644 --- a/tests/rest/client/v1/test_profile.py +++ b/tests/rest/client/v1/test_profile.py @@ -14,17 +14,14 @@ # limitations under the License. """Tests REST events for /profile paths.""" -from tests import unittest -from twisted.internet import defer - from mock import Mock +from twisted.internet import defer -from ....utils import MockHttpResource, setup_test_homeserver - +import synapse.types from synapse.api.errors import SynapseError, AuthError -from synapse.types import Requester, UserID - from synapse.rest.client.v1 import profile +from tests import unittest +from ....utils import MockHttpResource, setup_test_homeserver myid = "@1234ABCD:test" PATH_PREFIX = "/_matrix/client/api/v1" @@ -52,7 +49,7 @@ class ProfileTestCase(unittest.TestCase): ) def _get_user_by_req(request=None, allow_guest=False): - return Requester(UserID.from_string(myid), "", False) + return synapse.types.create_requester(myid) hs.get_v1auth().get_user_by_req = _get_user_by_req |