mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(test): Fix "TestClient"
TestClient changes were reverted with 0.37.2: https://github.com/encode/starlette/pull/2525 https://github.com/encode/starlette/releases/tag/0.37.2 Signed-off-by: moson <moson@archlinux.org>
This commit is contained in:
parent
6ba06801f7
commit
21e2ef5ecb
3 changed files with 9 additions and 9 deletions
|
@ -310,10 +310,10 @@ def pipeline():
|
|||
redis = redis_connection()
|
||||
pipeline = redis.pipeline()
|
||||
|
||||
# 'no-client' is our fallback value in case request.client is None
|
||||
# 'testclient' is our fallback value in case request.client is None
|
||||
# which is the case for TestClient
|
||||
pipeline.delete("ratelimit-ws:no-client")
|
||||
pipeline.delete("ratelimit:no-client")
|
||||
pipeline.delete("ratelimit-ws:testclient")
|
||||
pipeline.delete("ratelimit:testclient")
|
||||
pipeline.execute()
|
||||
|
||||
yield pipeline
|
||||
|
@ -760,8 +760,8 @@ def test_rpc_ratelimit(
|
|||
assert response.status_code == int(HTTPStatus.TOO_MANY_REQUESTS)
|
||||
|
||||
# Delete the cached records.
|
||||
pipeline.delete("ratelimit-ws:no-client")
|
||||
pipeline.delete("ratelimit:no-client")
|
||||
pipeline.delete("ratelimit-ws:testclient")
|
||||
pipeline.delete("ratelimit:testclient")
|
||||
one, two = pipeline.execute()
|
||||
assert one and two
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue