potiuk commented on code in PR #33731:
URL: https://github.com/apache/airflow/pull/33731#discussion_r1305707852
##########
tests/providers/microsoft/azure/operators/test_azure_batch.py:
##########
@@ -162,6 +162,7 @@ def setup_method(self, method, mock_batch, mock_hook):
self.batch_client = mock_batch.return_value
self.mock_instance = mock_hook.return_value
assert self.batch_client == self.operator.hook.connection
+ assert self.batch_client == self.operator2_pass.hook.connection
Review Comment:
Not sure why, but without that assertion in setup. the test
`TestAzureBatchOperator::test_execute_without_failures_2` fails with
```
self = <azure.batch.batch_auth.SharedKeyAuth object at 0xffffafb7fc10>,
string_to_sign = 'POST\n\n\n425\n\napplication/json; odata=minimalmetadata;
charset=utf-8\n\n\n\n\n\n\nocp-date:Fri, 25 Aug 2023 13:55:20
GMT\n/None/pools\napi-version:2023-05-01.17.0'
def _sign_string(self, string_to_sign):
> _key = self._key.encode('utf-8')
E AttributeError: 'NoneType' object has no attribute 'encode'
```
Maybe someone can explain it :)
--
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]