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