summary refs log tree commit diff
path: root/tests/utils.py
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <daniel@matrix.org>2016-03-03 16:43:42 +0000
committerDaniel Wagner-Hall <daniel@matrix.org>2016-03-03 16:43:42 +0000
commitb4022cc487921ec46942a6a72fb174bb7aa1e459 (patch)
tree7aa3d0948b96053a705e2150318cb76fba189f38 /tests/utils.py
parentMerge pull request #571 from matrix-org/daniel/asids (diff)
downloadsynapse-b4022cc487921ec46942a6a72fb174bb7aa1e459.tar.xz
Pass whole requester to ratelimiting
This will enable more detailed decisions
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/utils.py b/tests/utils.py
index c67fa1ca35..291b549053 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -20,6 +20,7 @@ from synapse.storage.prepare_database import prepare_database
 from synapse.storage.engines import create_engine
 from synapse.server import HomeServer
 from synapse.federation.transport import server
+from synapse.types import Requester
 from synapse.util.ratelimitutils import FederationRateLimiter
 
 from synapse.util.logcontext import LoggingContext
@@ -510,3 +511,7 @@ class DeferredMockCallable(object):
                     "call(%s)" % _format_call(c[0], c[1]) for c in calls
                 ])
             )
+
+
+def requester_for_user(user):
+    return Requester(user, None, False)