baolsen commented on a change in pull request #7541: [AIRFLOW-6822] AWS hooks 
should cache boto3 client
URL: https://github.com/apache/airflow/pull/7541#discussion_r385542845
 
 

 ##########
 File path: tests/providers/amazon/aws/operators/test_ecs.py
 ##########
 @@ -48,12 +48,10 @@
     ]
 }
 
-
+# pylint: disable=unused-argument
[email protected]('airflow.providers.amazon.aws.operators.ecs.AwsBaseHook')
 
 Review comment:
   Found a way to fix this. 
   I had to call `get_hook()` during the `setUp `function, while the hook was 
still mocked, to ensure that the operator saves the mocked hook in its 
`self.hook`
   If I call `get_hook()` for the first time _after_ the `setUp` (eg by the 
Operator execute) then it is no longer mocked.
   I guess this makes sense but it was really unexpected :)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to