  def testListCoveredPods(self, list_namespaced_pod):
    """Test that GetCoveredPods calls API correctly and returns correctly."""
    mock_pods = k8s_mocks.V1PodList(4)
    list_namespaced_pod.return_value = mock_pods
    service = services.K8sService(
        k8s_mocks.MOCK_API_CLIENT, 'service-name', 'service-namespace')
    with mock.patch.object(service, 'Read') as read:
      read.return_value = k8s_mocks.V1Service(selector_labels={'app': 'nginx'})
      self.assertEqual(
        {(pod.metadata.name, pod.metadata.namespace)
         for pod in mock_pods.items},
        {(pod.name, pod.namespace)
         for pod in service.GetCoveredPods()})
    list_namespaced_pod.assert_called_once_with(
        'service-namespace', label_selector='app=nginx')
Test that GetCoveredPods calls API correctly and returns correctly.
tests/providers/kubernetes/test_services.py