eladkal commented on code in PR #73234:
URL: https://github.com/apache/airflow/pull/73234#discussion_r4059428938
##########
providers/keycloak/tests/unit/keycloak/auth_manager/test_keycloak_auth_manager.py:
##########
@@ -1102,6 +1112,18 @@ def test_filter_authorized_menu_items_with_failure(self,
status_code, auth_manag
token_url, data=payload, headers=headers, timeout=5
)
+ def test_filter_authorized_menu_items_invalid_grant(self, auth_manager,
user):
+ resp = Mock()
+ resp.status_code = 400
+ resp.text = '{"error": "invalid_grant", "error_description": "Invalid
bearer token"}'
+ auth_manager.http_session.post = Mock(return_value=resp)
+
+ result = auth_manager.filter_authorized_menu_items(
+ [MenuItem.ASSETS, MenuItem.CONNECTIONS], user=user
+ )
Review Comment:
```suggestion
result = auth_manager.filter_authorized_menu_items([MenuItem.ASSETS,
MenuItem.CONNECTIONS], user=user)
```
Fix static checks
--
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]