From bd22fb4451a0786f54883a80efb85a87975d7c11 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 11 Jun 2018 10:47:07 +0200 Subject: [PATCH 1/2] tests: non regressions test for opened session cookie on API calls (#24407) --- tests/test_api.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_api.py b/tests/test_api.py index f6d7bf29..23e4efff 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -819,3 +819,10 @@ def test_api_get_role_list(app, admin_ou1, role_ou1, role_random): for role_dict in resp.json['results']: for field in role_fields: assert field in role_dict + + +def test_no_opened_session_cookie_on_api(app, user, settings): + settings.A2_OPENED_SESSION_COOKIE_DOMAIN = 'localhost' + app.authorization = ('Basic', (user.username, user.username)) + resp = app.get('/api/users/') + assert 'A2_OPENED_SESSION' not in app.cookies -- 2.17.0