dstandish commented on code in PR #27116:
URL: https://github.com/apache/airflow/pull/27116#discussion_r999998675
##########
tests/providers/cncf/kubernetes/operators/test_kubernetes_pod.py:
##########
@@ -102,15 +106,14 @@ def run_pod(self, operator: KubernetesPodOperator,
map_index: int = -1) -> k8s.V
remote_pod_mock = MagicMock()
remote_pod_mock.status.phase = 'Succeeded'
self.await_pod_mock.return_value = remote_pod_mock
- if not isinstance(self.hook_mock.return_value.is_in_cluster, bool):
- self.hook_mock.return_value.is_in_cluster = True
operator.execute(context=context)
return self.await_start_mock.call_args[1]['pod']
def sanitize_for_serialization(self, obj):
return ApiClient().sanitize_for_serialization(obj)
- def test_config_path(self):
+ @patch(HOOK_CLASS)
Review Comment:
you see this added in many places because we're not patching it globally
--
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]