diff --git a/tests/integration/api_experimental/auth/backend/test_kerberos_auth.py b/tests/integration/api_experimental/auth/backend/test_kerberos_auth.py index 3641163952bb8..030a26ea77f9d 100644 --- a/tests/integration/api_experimental/auth/backend/test_kerberos_auth.py +++ b/tests/integration/api_experimental/auth/backend/test_kerberos_auth.py @@ -62,8 +62,9 @@ def _set_attrs(self, app_for_kerberos, dagbag_to_db): def test_trigger_dag(self): with self.app.test_client() as client: url_template = "/api/experimental/dags/{}/dag_runs" + url_path = url_template.format("example_bash_operator") response = client.post( - url_template.format("example_bash_operator"), + url_path, data=json.dumps(dict(run_id="my_run" + datetime.now().isoformat())), content_type="application/json", ) @@ -79,6 +80,8 @@ class Request: response.raw = mock.MagicMock() response.connection = mock.MagicMock() response.connection.send = mock.MagicMock() + response.connection.send.return_value = mock.MagicMock() + response.connection.send.return_value.url = url_path # disable mutual authentication for testing CLIENT_AUTH.mutual_authentication = 3