class_docstr: Tests basic helm chart tests.
class_docstr_tok: ["Tests","basic","helm","chart","tests","."]
code: def test_basic_deployments(self, version):
      expected_object_count_in_basic_deployment = (
          self._get_object_count(version)
      )
      k8s_objects = render_chart(
          "test-basic",
          self._get_values_with_version(
              values={
                  "chart": {
                      "metadata": "AA",
                  },
                  "labels": {"test-label": "TEST-VALUE"},
                  "fullnameOverride": "test-basic",
              },
              version=version,
          ),
      )
      list_of_kind_names_tuples = {
          (k8s_object["kind"], k8s_object["metadata"]["name"])
          for k8s_object in k8s_objects
      }
      expected = {
          ("ServiceAccount", "test-basic-create-user-job"),
          ("ServiceAccount", "test-basic-migrate-database-job"),
          ("ServiceAccount", "test-basic-redis"),
          ("ServiceAccount", "test-basic-scheduler"),
          ("ServiceAccount", "test-basic-statsd"),
          ("ServiceAccount", "test-basic-triggerer"),
          ("ServiceAccount", "test-basic-webserver"),
          ("ServiceAccount", "test-basic-worker"),
          ("Secret", "test-basic-metadata"),
          ("Secret", "test-basic-broker-url"),
          ("Secret", "test-basic-fernet-key"),
          ("Secret", "test-basic-webserver-secret-key"),
          ("Secret", "test-basic-postgresql"),
          ("Secret", "test-basic-redis-password"),
          ("ConfigMap", "test-basic-config"),
          ("ConfigMap", "test-basic-statsd"),
          ("Role", "test-basic-pod-launcher-role"),
          ("Role", "test-basic-pod-log-reader-role"),
          ("RoleBinding", "test-basic-pod-launcher-rolebinding"),
          ("RoleBinding", "test-basic-pod-log-reader-rolebinding"),
          ("Service", "test-basic-postgresql-hl"),
          ("Service", "test-basic-postgresql"),
          ("Service", "test-basic-redis"),
          ("Service", "test-basic-statsd"),
          ("Service", "test-basic-webserver"),
          ("Service", "test-basic-worker"),
          ("Deployment", "test-basic-scheduler"),
          ("Deployment", "test-basic-statsd"),
          (self.default_trigger_obj(version), "test-basic-triggerer"),
          ("Deployment", "test-basic-webserver"),
          ("StatefulSet", "test-basic-postgresql"),
          ("StatefulSet", "test-basic-redis"),
          ("StatefulSet", "test-basic-worker"),
          ("Job", "test-basic-create-user"),
          ("Job", "test-basic-run-airflow-migrations"),
      }
      if version == "2.3.2":
          expected.add(("Secret", "test-basic-result-backend"))
      if version == "default":
          expected.add(("Service", "test-basic-triggerer"))
      assert list_of_kind_names_tuples == expected
      assert expected_object_count_in_basic_deployment == len(
          k8s_objects
      )
      for k8s_object in k8s_objects:
          labels = jmespath.search("metadata.labels", k8s_object) or {}
          if "helm.sh/chart" in labels:
              chart_name = labels.get("helm.sh/chart")
          else:
              chart_name = labels.get("chart")
          if chart_name and "postgresql" in chart_name:
              continue
          k8s_name = (
              k8s_object["kind"] + ":" + k8s_object["metadata"]["name"]
          )
          assert "TEST-VALUE" == labels.get(
              "test-label"
          ), f"Missing label test-label on {k8s_name}. Current labels: {labels}"
  
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 3 for calling the TestBaseChartTest obj's underlying member method code with example usage: obj.test_basic_deployments(version) without return types