vincbeck commented on code in PR #77510:
URL: https://github.com/apache/airflow/pull/77510#discussion_r4681200543
##########
providers/keycloak/tests/unit/keycloak/auth_manager/test_middleware.py:
##########
@@ -704,7 +704,7 @@ def test_refresh_user_sets_keycloak_cookies(self,
mock_auth_manager, mock_user):
None,
)
assert seen["authenticated_via"] is trusted_marker
- mock_auth_manager.refresh_user.asssert_any_call(
+ mock_auth_manager.refresh_user.assert_any_call(
user=KeycloakAuthManager._attach_keycloak_tokens(mock_user,
access_token, "refresh_token")
)
Review Comment:
nit: `_attach_keycloak_tokens` changes `mock_user` in place and returns it,
so this is the same as checking `user=mock_user`
```suggestion
mock_auth_manager.refresh_user.assert_any_call(user=mock_user)
```
##########
providers/amazon/tests/unit/amazon/aws/hooks/test_base_aws.py:
##########
@@ -1118,7 +1120,7 @@ def test_get_session(
region_name=method_region_name,
config=mock.ANY,
)
- assert mock_session_factory_instance.create_session.assert_called_once
+ mock_session_factory_instance.create_session.assert_called_once()
Review Comment:
nit: since this now runs, you can also check the argument
```suggestion
mock_session_factory_instance.create_session.assert_called_once_with(deferrable=False)
```
--
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]