bito-code-review[bot] commented on PR #40201:
URL: https://github.com/apache/superset/pull/40201#issuecomment-4473989400
<!-- Bito Reply -->
The issue is valid and should be addressed. The `set_cookie` call in the
test is using the outdated signature with `server_name`, which is no longer
supported in the current Flask/Werkzeug version. This causes a `TypeError` and
prevents the test from validating the session invalidation logic. To fix this,
update the call to use the newer `key, value` signature, optionally including
the `domain` keyword argument if needed.
Here's how to fix it:
1. **Locate the call:** In `tests/integration_tests/security/api_tests.py`
at line 432, find the line: `replay_client.set_cookie('localhost', name,
value)`.
2. **Update the call:** Change it to `replay_client.set_cookie(name, value)`
or `replay_client.set_cookie(name, value, domain='localhost')` if the domain is
required.
3. **Verify the fix:** Run the test again to ensure it no longer raises a
`TypeError` and correctly validates the session invalidation behavior.
After applying this fix, I recommend checking the rest of the PR comments to
see if there are other similar issues that need addressing.
**tests/integration_tests/security/api_tests.py**
```
replay_client.set_cookie(name, value)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]