bugraoz93 commented on code in PR #55702:
URL: https://github.com/apache/airflow/pull/55702#discussion_r2353341260


##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_assets_post.py:
##########
@@ -0,0 +1,75 @@
+# Licensed to the Apache Software Foundation (ASF) under one

Review Comment:
   I think this test should be directly in the same file name matching with the 
assets.py. Thanks for including the tests!



##########
airflow-ctl/src/airflowctl/api/operations.py:
##########
@@ -238,6 +239,16 @@ def list_by_alias(self) -> AssetAliasCollectionResponse | 
ServerResponseError:
         """List all assets by alias from the API server."""
         return super().execute_list(path="/assets/aliases", 
data_model=AssetAliasCollectionResponse)
 
+    def create(self, asset_body: CreateAssetBody) -> AssetResponse | 
ServerResponseError:
+        """Create an asset."""
+        try:
+            self.response = self.client.post(
+                "assets", json=_date_safe_dict_from_pydantic(asset_body)
+            )
+            return AssetResponse.model_validate_json(self.response.content)
+        except ServerResponseError as e:
+            raise e
+
     def create_event(

Review Comment:
   Connected issue #55697 is related to this



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