  def testIsCoveringPodDifferentNamespace(self, workload_pod_match_labels):
    """Test that pod is not covered by workload with different namespace."""
    # Patch abstract method
    workload_pod_match_labels.return_value = self.mock_match_labels
    workload = workloads.K8sControlledWorkload(
        k8s_mocks.MOCK_API_CLIENT, 'name', 'namespace')

    mock_pod_response = k8s_mocks.V1Pod(labels=self.mock_match_labels)
    mock_pod = base.K8sPod(k8s_mocks.MOCK_API_CLIENT, 'name', 'production')

    with mock.patch.object(mock_pod, 'Read') as mock_pod_read:
      mock_pod_read.return_value = mock_pod_response
      self.assertFalse(workload.IsCoveringPod(mock_pod))
Test that pod is not covered by workload with different namespace.
tests/providers/kubernetes/test_workloads.py