From d8f7cb285288abe0350d681e8f8b7ca56f16bc8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Casaj=C3=BAs?= Date: Wed, 10 Jul 2024 13:14:35 +0200 Subject: [PATCH] Use header in api tests --- tests/conftest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 37b2abbd..f2179a43 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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