lifecycle: add cookies attribute to ConnexionRequest (#1168) (#1209)

Co-authored-by: Robbe Sneyders <robbe.sneyders@ml6.eu>
This commit is contained in:
Nicolas Noirbent
2022-02-23 22:45:34 +01:00
committed by GitHub
parent a6717c3bbf
commit a1dddf62d4
10 changed files with 71 additions and 3 deletions

View File

@@ -509,3 +509,11 @@ def test_get_unicode_request(simple_app):
resp = app_client.get('/v1.0/get_unicode_request?price=%C2%A319.99') # £19.99
assert resp.status_code == 200
assert json.loads(resp.data.decode('utf-8'))['price'] == '£19.99'
def test_cookie_param(simple_app):
app_client = simple_app.app.test_client()
app_client.set_cookie("localhost", "test_cookie", "hello")
response = app_client.get("/v1.0/test-cookie-param")
assert response.status_code == 200
assert response.json == {"cookie_value": "hello"}