bito-code-review[bot] commented on PR #44011:
URL: https://github.com/apache/superset/pull/44011#issuecomment-5802111794
<!-- Bito Reply -->
The flagged issue is correct. The current test only verifies that a
`SupersetTemplateException` is raised, but it does not assert that the
exception status is 422, which is necessary to ensure the API contract is
properly enforced.
To resolve this, you should update the test to explicitly check the status
code of the raised exception. You can modify the test as follows:
```python
with pytest.raises(SupersetTemplateException) as excinfo:
processor.raise_for_access()
assert excinfo.value.status == 422
```
I have checked the PR comments, and there are no other comments to address.
Would you like me to fetch all comments to validate and implement fixes for any
other issues?
**tests/unit_tests/common/test_query_context_processor.py**
```
with pytest.raises(SupersetTemplateException) as excinfo:
processor.raise_for_access()
assert excinfo.value.status == 422
```
--
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]