mik-laj commented on a change in pull request #9095:
URL: https://github.com/apache/airflow/pull/9095#discussion_r435426778
##########
File path: tests/api_connexion/endpoints/test_connection_endpoint.py
##########
@@ -29,38 +30,99 @@ def setUpClass(cls) -> None:
def setUp(self) -> None:
self.client = self.app.test_client() # type:ignore
+ # we want only the connection created here for this test
+ with create_session() as session:
+ session.query(Connection).delete()
+
+ def tearDown(self) -> None:
+ clear_db_connections()
class TestDeleteConnection(TestConnectionEndpoint):
- @pytest.mark.skip(reason="Not implemented yet")
+ @unittest.skip("Not implemented yet")
def test_should_response_200(self):
response = self.client.delete("/api/v1/connections/1")
assert response.status_code == 200
class TestGetConnection(TestConnectionEndpoint):
- @pytest.mark.skip(reason="Not implemented yet")
- def test_should_response_200(self):
- response = self.client.get("/api/v1/connection/1")
+
+ @provide_session
+ def test_should_response_200(self, session):
Review comment:
Can you add support for 404 as well?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]