class_docstr: Tests pod template file.
class_docstr_tok: ["Tests","pod","template","file","."]
code: def test_should_use_global_affinity_tolerations_and_node_selector(
      self,
  ):
      docs = render_chart(
          values={
              "executor": "KubernetesExecutor",
              "affinity": {
                  "nodeAffinity": {
                      "requiredDuringSchedulingIgnoredDuringExecution": {
                          "nodeSelectorTerms": [
                              {
                                  "matchExpressions": [
                                      {
                                          "key": "foo",
                                          "operator": "In",
                                          "values": ["true"],
                                      },
                                  ]
                              }
                          ]
                      }
                  }
              },
              "tolerations": [
                  {
                      "key": "dynamic-pods",
                      "operator": "Equal",
                      "value": "true",
                      "effect": "NoSchedule",
                  }
              ],
              "nodeSelector": {"diskType": "ssd"},
          },
          show_only=["templates/pod-template-file.yaml"],
          chart_dir=self.temp_chart_dir,
      )
  
      assert re.search("Pod", docs[0]["kind"])
      assert "foo" == jmespath.search(
          "spec.affinity.nodeAffinity."
          "requiredDuringSchedulingIgnoredDuringExecution."
          "nodeSelectorTerms[0]."
          "matchExpressions[0]."
          "key",
          docs[0],
      )
      assert "ssd" == jmespath.search(
          "spec.nodeSelector.diskType",
          docs[0],
      )
      assert "dynamic-pods" == jmespath.search(
          "spec.tolerations[0].key",
          docs[0],
      )
  
imports: from __future__ import annotations
  import re
  from pathlib import Path
  from shutil import copyfile, copytree
  from tempfile import TemporaryDirectory
  import jmespath
  import pytest
  from helm_tests.airflow_aux.test_container_lifecycle import CONTAINER_LIFECYCLE_PARAMETERS
  from tests.charts.helm_template_generator import render_chart
label_desc: Use image node_id 14 for calling the TestPodTemplateFile obj's underlying member method code with example usage: obj.test_should_use_global_affinity_tolerations_and_node_selector() without return types