class_docstr: Tests PgBouncer Network Policy.
class_docstr_tok: ["Tests","PgBouncer","Network","Policy","."]
code: def test_pgbouncer_network_policy_with_keda(
      self, conf, expected_selector
  ):
      docs = render_chart(
          values={
              "pgbouncer": {"enabled": True},
              "networkPolicies": {"enabled": True},
              **conf,
          },
          show_only=[
              "templates/pgbouncer/pgbouncer-networkpolicy.yaml"
          ],
      )
  
      assert expected_selector == jmespath.search(
          "spec.ingress[0].from[1:]", docs[0]
      )
  
imports: from __future__ import annotations
  import base64
  import jmespath
  import pytest
  from tests.charts.helm_template_generator import render_chart
label_desc: Use image node_id 2 for calling the TestPgbouncerNetworkPolicy obj's underlying member method code with example usage: obj.test_pgbouncer_network_policy_with_keda(conf, expected_selector) without return types