mirror of
https://github.com/simple-login/app.git
synced 2024-11-10 21:27:10 +01:00
Use header in api tests
This commit is contained in:
parent
5d48b5878f
commit
d8f7cb2852
@ -1,5 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
# use the tests/test.env config fle
|
# use the tests/test.env config fle
|
||||||
# flake8: noqa: E402
|
# flake8: noqa: E402
|
||||||
|
|
||||||
@ -42,7 +43,7 @@ def flask_app():
|
|||||||
yield app
|
yield app
|
||||||
|
|
||||||
|
|
||||||
from app import config
|
from app import config, constants
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
@ -54,6 +55,7 @@ def flask_client():
|
|||||||
config.DISABLE_RATE_LIMIT = True
|
config.DISABLE_RATE_LIMIT = True
|
||||||
try:
|
try:
|
||||||
client = app.test_client()
|
client = app.test_client()
|
||||||
|
client.environ_base[constants.HEADER_ALLOW_API_COOKIES] = "allow"
|
||||||
yield client
|
yield client
|
||||||
finally:
|
finally:
|
||||||
# disable rate limit again as some tests might enable rate limit
|
# disable rate limit again as some tests might enable rate limit
|
||||||
|
Loading…
Reference in New Issue
Block a user