You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/12/06 12:00:29 UTC

[GitHub] [airflow] Taragolis commented on a diff in pull request #28149: Migrate amazon provider operator tests from `unittests` to `pytest`

Taragolis commented on code in PR #28149:
URL: https://github.com/apache/airflow/pull/28149#discussion_r1040883358


##########
tests/providers/amazon/aws/operators/test_batch.py:
##########
@@ -49,7 +48,7 @@ class TestBatchOperator(unittest.TestCase):
     @mock.patch.dict("os.environ", AWS_ACCESS_KEY_ID=AWS_ACCESS_KEY_ID)
     @mock.patch.dict("os.environ", AWS_SECRET_ACCESS_KEY=AWS_SECRET_ACCESS_KEY)
     @mock.patch("airflow.providers.amazon.aws.hooks.batch_client.AwsBaseHook.get_client_type")
-    def setUp(self, get_client_type_mock):
+    def setup(self, get_client_type_mock):

Review Comment:
   This will fail, if you decorate setup_method/teardown_method or entire class you need to provide `method` argument see discussions:
   - https://github.com/apache/airflow/pull/28039#discussion_r1037813189
   - https://github.com/apache/airflow/pull/28039#discussion_r1037814650
   
   ```suggestion
       def setup(self, method, get_client_type_mock):
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org