  def testNetworkPolicyCreationSpec(self, mock_create_func):
    """Test that creating a network policy provides the correct spec."""
    network_policy = netpol.K8sNetworkPolicyWithSpec(
        k8s_mocks.MOCK_API_CLIENT, 'name', 'namespace')
    network_policy.Create()
    self.assertEqual(self.mock_spec, mock_create_func.call_args.args[1].spec)
Test that creating a network policy provides the correct spec.
tests/providers/kubernetes/test_netpol.py