vincbeck commented on code in PR #60781:
URL: https://github.com/apache/airflow/pull/60781#discussion_r2705835748


##########
airflow-core/tests/unit/api_fastapi/auth/middlewares/test_refresh_token.py:
##########
@@ -64,8 +64,8 @@ async def test_dispatch_invalid_token(self, 
mock_refresh_user, middleware, mock_
         call_next = AsyncMock(return_value=Response())
 
         response = await middleware.dispatch(mock_request, call_next)
-        assert response.status_code == 403
-        assert response.body == b'{"detail":"Invalid JWT token"}'
+        assert response.status_code == 200

Review Comment:
   Good question. In reality this will most likely return a 401. The difference 
here is it is a test, thus the route itself is mocked and return a 200. But in 
real life, if the token is expired, the route itself will also return a 401



-- 
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]

Reply via email to