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
|
@ -391,10 +391,10 @@ def test_post_register_error_invalid_captcha(client: TestClient):
|
|||
|
||||
|
||||
def test_post_register_error_ip_banned(client: TestClient):
|
||||
# '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
|
||||
with db.begin():
|
||||
create(Ban, IPAddress="no-client", BanTS=datetime.utcnow())
|
||||
create(Ban, IPAddress="testclient", BanTS=datetime.utcnow())
|
||||
|
||||
with client as request:
|
||||
response = post_register(request)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue