jscheffl commented on code in PR #44531:
URL: https://github.com/apache/airflow/pull/44531#discussion_r1864882120


##########
tests/api_fastapi/core_api/routes/public/test_connections.py:
##########
@@ -298,6 +309,180 @@ def test_post_should_response_201_redacted_password(self, 
test_client, body, exp
         assert response.json() == expected_response
 
 
+class TestPostConnections(TestConnectionEndpoint):
+    @pytest.mark.parametrize(
+        "body",
+        [
+            {
+                "connections": [
+                    {"connection_id": TEST_CONN_ID, "conn_type": 
TEST_CONN_TYPE},
+                    {"connection_id": TEST_CONN_ID_2, "conn_type": 
TEST_CONN_TYPE_2, "extra": None},
+                ]
+            },
+            {
+                "connections": [
+                    {"connection_id": TEST_CONN_ID, "conn_type": 
TEST_CONN_TYPE, "extra": "{}"},
+                    {
+                        "connection_id": TEST_CONN_ID_2,
+                        "conn_type": TEST_CONN_TYPE_2,
+                        "extra": '{"key": "value"}',
+                    },
+                    {
+                        "connection_id": TEST_CONN_ID_3,
+                        "conn_type": TEST_CONN_ID_3,
+                        "description": "test_description",
+                        "host": "test_host",
+                        "login": "test_login",
+                        "schema": "test_schema",
+                        "port": 8080,
+                        "extra": '{"key": "value"}',
+                    },
+                ]
+            },
+        ],
+    )
+    def test_post_should_respond_200(self, test_client, session, body):

Review Comment:
   200 or 201 :-D
   ```suggestion
       def test_post_should_respond_201(self, test_client, session, body):
   ```



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