diff --git a/tests/flask_imports/dry_plugin_flask.py b/tests/flask_imports/dry_plugin_flask.py index f1a2cd6..9b720c0 100644 --- a/tests/flask_imports/dry_plugin_flask.py +++ b/tests/flask_imports/dry_plugin_flask.py @@ -208,7 +208,8 @@ def test_flask_make_response_post(client): assert resp.json == {"name": payload.name, "score": [payload.limit]} assert resp.headers.get("lang") == "en-US" cookie_result = re.match( - r"^test_cookie=\"((\w+\s?){3})\";\sPath=/$", resp.headers.get("Set-Cookie") + r"^test_cookie=\"((\w+\s?){3})\"; Secure; HttpOnly; Path=/; SameSite=Strict$", + resp.headers.get("Set-Cookie"), ) assert cookie_result.group(1) == payload.name @@ -227,7 +228,8 @@ def test_flask_make_response_get(client): assert resp.json == {"name": payload.name, "score": [payload.limit]} assert resp.headers.get("lang") == "en-US" cookie_result = re.match( - r"^test_cookie=\"((\w+\s?){3})\";\sPath=/$", resp.headers.get("Set-Cookie") + r"^test_cookie=\"((\w+\s?){3})\"; Secure; HttpOnly; Path=/; SameSite=Strict$", + resp.headers.get("Set-Cookie"), ) assert cookie_result.group(1) == payload.name diff --git a/tests/test_plugin_flask.py b/tests/test_plugin_flask.py index 124f8cd..902822f 100644 --- a/tests/test_plugin_flask.py +++ b/tests/test_plugin_flask.py @@ -211,6 +211,9 @@ def return_make_response_post(): response.set_cookie( key="test_cookie", value=model_data.name, + secure=True, + httponly=True, + samesite="Strict", ) return response @@ -226,6 +229,9 @@ def return_make_response_get(): response.set_cookie( key="test_cookie", value=model_data.name, + secure=True, + httponly=True, + samesite="Strict", ) return response diff --git a/tests/test_plugin_flask_blueprint.py b/tests/test_plugin_flask_blueprint.py index 6fb849a..c277e84 100644 --- a/tests/test_plugin_flask_blueprint.py +++ b/tests/test_plugin_flask_blueprint.py @@ -198,6 +198,9 @@ def return_make_response_post(): response.set_cookie( key="test_cookie", value=model_data.name, + secure=True, + httponly=True, + samesite="Strict", ) return response @@ -213,6 +216,9 @@ def return_make_response_get(): response.set_cookie( key="test_cookie", value=model_data.name, + secure=True, + httponly=True, + samesite="Strict", ) return response diff --git a/tests/test_plugin_flask_view.py b/tests/test_plugin_flask_view.py index e7795ba..2f6b072 100644 --- a/tests/test_plugin_flask_view.py +++ b/tests/test_plugin_flask_view.py @@ -212,6 +212,9 @@ def post(self): response.set_cookie( key="test_cookie", value=model_data.name, + secure=True, + httponly=True, + samesite="Strict", ) return response @@ -229,6 +232,9 @@ def get(self): response.set_cookie( key="test_cookie", value=model_data.name, + secure=True, + httponly=True, + samesite="Strict", ) return response