You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ferruzzi (via GitHub)" <gi...@apache.org> on 2023/07/26 22:50:12 UTC

[GitHub] [airflow] ferruzzi commented on a diff in pull request #32819: Handle logout by auth manager

ferruzzi commented on code in PR #32819:
URL: https://github.com/apache/airflow/pull/32819#discussion_r1275554351


##########
tests/auth/managers/fab/test_fab_auth_manager.py:
##########
@@ -81,3 +81,14 @@ def test_get_url_login_with_next(self, mock_url_for, auth_manager):
         auth_manager.security_manager.auth_view.endpoint = "test_endpoint"
         auth_manager.get_url_login(next_url="next_url")
         mock_url_for.assert_called_once_with("test_endpoint.login", next="next_url")
+
+    def test_get_url_logout_when_auth_view_not_defined(self, auth_manager):
+        with pytest.raises(AirflowException, match="`auth_view` not defined in the security manager."):
+            auth_manager.get_url_logout()

Review Comment:
   Might maybe be worth mocking url_for() and asserting that it doesn't get called, but I'm fine with this as it is.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org