class_docstr: Tests basic helm chart tests.
class_docstr_tok: ["Tests","basic","helm","chart","tests","."]
code: def test_network_policies_are_valid(self):
      k8s_objects = render_chart(
          "test-basic",
          {
              "networkPolicies": {"enabled": True},
              "executor": "CeleryExecutor",
              "flower": {"enabled": True},
              "pgbouncer": {"enabled": True},
          },
      )
      kind_names_tuples = {
          (k8s_object["kind"], k8s_object["metadata"]["name"])
          for k8s_object in k8s_objects
      }
  
      expected_kind_names = [
          ("NetworkPolicy", "test-basic-redis-policy"),
          ("NetworkPolicy", "test-basic-flower-policy"),
          ("NetworkPolicy", "test-basic-pgbouncer-policy"),
          ("NetworkPolicy", "test-basic-scheduler-policy"),
          ("NetworkPolicy", "test-basic-statsd-policy"),
          ("NetworkPolicy", "test-basic-webserver-policy"),
          ("NetworkPolicy", "test-basic-worker-policy"),
      ]
      for kind_name in expected_kind_names:
          assert kind_name in kind_names_tuples
  
imports: from __future__ import annotations
  import base64
  import warnings
  from subprocess import CalledProcessError
  from typing import Any
  from unittest import mock
  import jmespath
  import pytest
  from tests.charts.helm_template_generator import render_chart
label_desc: Use image node_id 8 for calling the TestBaseChartTest obj's underlying member method code with example usage: obj.test_network_policies_are_valid() without return types