mirror of
https://github.com/laurentS/slowapi.git
synced 2026-02-04 11:54:29 +08:00
✅ improve exempt decorator test
This commit is contained in:
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
.pytest_cache
|
||||
__pycache__
|
||||
|
||||
# editors
|
||||
.idea
|
||||
@@ -190,7 +190,7 @@ class TestDecorators(TestSlowapi):
|
||||
return PlainTextResponse("test")
|
||||
|
||||
with TestClient(app) as cli:
|
||||
resp = cli.get("/t2", headers={"X_FORWARDED_FOR": "127.0.0.11"})
|
||||
resp = cli.get("/t2", headers={"X_FORWARDED_FOR": "127.0.0.10"})
|
||||
assert resp.status_code == 200
|
||||
resp2 = cli.get("/t2", headers={"X_FORWARDED_FOR": "127.0.0.11"})
|
||||
resp2 = cli.get("/t2", headers={"X_FORWARDED_FOR": "127.0.0.10"})
|
||||
assert resp2.status_code == 200
|
||||
Reference in New Issue
Block a user