SameerMesiah97 commented on code in PR #74125:
URL: https://github.com/apache/airflow/pull/74125#discussion_r4170415283


##########
providers/amazon/tests/unit/amazon/aws/waiters/test_comprehend.py:
##########
@@ -102,3 +103,38 @@ def test_create_document_classifier_wait(self, 
mock_describe_document_classifier
         ComprehendHook().get_waiter(self.WAITER_NAME).wait(
             DocumentClassifierArn="arn", WaiterConfig={"Delay": 0.01, 
"MaxAttempts": 3}
         )
+
+
+class 
TestComprehendDocumentClassifierDeletableWaiter(TestComprehendCustomWaitersBase):
+    WAITER_NAME = "document_classifier_deletable"
+
+    @pytest.fixture
+    def mock_describe_document_classifier(self):
+        with mock.patch.object(self.client, "describe_document_classifier") as 
mock_getter:
+            yield mock_getter
+
+    @pytest.mark.parametrize("state", ["TRAINED", "TRAINED_WITH_WARNING", 
"IN_ERROR", "STOPPED"])
+    def test_document_classifier_deletable(self, state, 
mock_describe_document_classifier):
+        mock_describe_document_classifier.return_value = 
{"DocumentClassifierProperties": {"Status": state}}
+
+        
ComprehendHook().get_waiter(self.WAITER_NAME).wait(DocumentClassifierArn="arn")
+

Review Comment:
   I would add this assert:
   
   ```
   mock_describe_document_classifier.assert_called_once_with(
       DocumentClassifierArn="arn"
   )
   ```



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