ahilashsasidharan commented on code in PR #63994:
URL: https://github.com/apache/airflow/pull/63994#discussion_r3069413533


##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_pools.py:
##########
@@ -416,6 +417,24 @@ def test_patch_pool3_should_respond_200(self, test_client, 
session):
         assert response.json() == expected_response
         check_last_log(session, dag_id=None, event="patch_pool", 
logical_date=None)
 
+    def test_patch_pool_rejects_team_name_when_multi_team_disabled(self, 
test_client):
+        self.create_pools()
+        with conf_vars({("core", "multi_team"): "False"}):
+            response = test_client.patch(
+                f"/pools/{POOL2_NAME}",
+                json={
+                    "name": POOL2_NAME,
+                    "slots": POOL2_SLOT,
+                    "include_deferred": POOL2_INCLUDE_DEFERRED,
+                    "team_name": "test",
+                },
+            )
+        assert response.status_code == 422
+        assert (
+            response.json()["detail"][0]["msg"]
+            == "Value error, team_name cannot be set when multi_team mode is 
disabled"

Review Comment:
   Done.



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