mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:56:07 -04:00
Ratelimit 3PID /requestToken API (#9238)
This commit is contained in:
parent
54a6afeee3
commit
4b73488e81
11 changed files with 159 additions and 14 deletions
|
@ -386,6 +386,7 @@ class HomeserverTestCase(TestCase):
|
|||
custom_headers: Optional[
|
||||
Iterable[Tuple[Union[bytes, str], Union[bytes, str]]]
|
||||
] = None,
|
||||
client_ip: str = "127.0.0.1",
|
||||
) -> FakeChannel:
|
||||
"""
|
||||
Create a SynapseRequest at the path using the method and containing the
|
||||
|
@ -410,6 +411,9 @@ class HomeserverTestCase(TestCase):
|
|||
|
||||
custom_headers: (name, value) pairs to add as request headers
|
||||
|
||||
client_ip: The IP to use as the requesting IP. Useful for testing
|
||||
ratelimiting.
|
||||
|
||||
Returns:
|
||||
The FakeChannel object which stores the result of the request.
|
||||
"""
|
||||
|
@ -426,6 +430,7 @@ class HomeserverTestCase(TestCase):
|
|||
content_is_form,
|
||||
await_result,
|
||||
custom_headers,
|
||||
client_ip,
|
||||
)
|
||||
|
||||
def setup_test_homeserver(self, *args, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue