utkarsharma2 commented on code in PR #32331:
URL: https://github.com/apache/airflow/pull/32331#discussion_r1253588238


##########
tests/providers/amazon/aws/hooks/test_glue_crawler.py:
##########
@@ -160,6 +160,18 @@ def test_remove_all_tags(self, mock_get_conn):
             ResourceArn=self.crawler_arn, TagsToRemove=["test", "bar"]
         )
 
+    @mock_sts
+    @mock.patch.object(GlueCrawlerHook, "get_conn")
+    def test_update_missing_tags(self, mock_get_conn):
+        mock_config_missing_tags = deepcopy(mock_config)
+        mock_config_missing_tags.pop("Tags")
+        mock_get_conn.return_value.get_crawler.return_value = {"Crawler": 
mock_config_missing_tags}
+
+        assert self.hook.update_crawler(**mock_config_missing_tags) is False

Review Comment:
   Ya, they are covered. I got confused by these lines, it seems like they 
don't add any value to the test. Test seems to work even after removing them. 
   
https://github.com/apache/airflow/blob/d01248382fe45a5f5a7fdeed4082a80c5f814ad8/tests/providers/amazon/aws/hooks/test_glue_crawler.py#L169-L170
   



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