tests.custom_flask_client.CustomFlaskClient.set_cookie
- CustomFlaskClient.set_cookie(server_name: str, key: str, value: str = '', max_age: Optional[Union[datetime.timedelta, int]] = None, expires: Optional[Union[str, datetime.datetime, int, float]] = None, path: str = '/', domain: Optional[str] = None, secure: bool = False, httponly: bool = False, samesite: Optional[str] = None, charset: str = 'utf-8') → None
Sets a cookie in the client’s cookie jar. The server name is required and has to match the one that is also passed to the open call.