im-perativa commented on code in PR #36781:
URL: https://github.com/apache/airflow/pull/36781#discussion_r1456795358


##########
tests/api_connexion/endpoints/test_dataset_endpoint.py:
##########
@@ -81,6 +84,95 @@ def _create_dataset(self, session):
         return dataset_model
 
 
+class TestDeleteDatasetEndpoint(TestDatasetEndpoint):
+    def test_delete_should_respond_204(self, session):
+        dataset_model = DatasetModel(
+            id=1,
+            uri="s3://bucket/key",
+            extra={"foo": "bar"},
+            created_at=timezone.parse(self.default_time),
+            updated_at=timezone.parse(self.default_time),
+        )
+
+        session.add(dataset_model)
+        session.commit()
+        datasets = session.query(DatasetModel).all()
+        assert len(datasets) == 1
+        response = self.client.delete(
+            f"/api/v1/datasets/{urllib.parse.quote('s3://bucket/key', 
safe='')}",

Review Comment:
   I just found that previously we already use `id` in the endpoint but changed 
by https://github.com/apache/airflow/pull/25770. Added some relevant docs in 
the spec on how to put the URI in API URL. Re-requesting your review @uranusjr 



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