class_docstr: Tests flower network policy.
class_docstr_tok: ["Tests","flower","network","policy","."]
code: def test_ports_overrides(self, ports, expected_ports):
      docs = render_chart(
          values={
              "networkPolicies": {"enabled": True},
              "flower": {
                  "enabled": True,
                  "networkPolicy": {
                      "ingress": {
                          "from": [
                              {
                                  "namespaceSelector": {
                                      "matchLabels": {
                                          "release": "myrelease"
                                      }
                                  }
                              }
                          ],
                          "ports": ports,
                      }
                  },
              },
          },
          show_only=["templates/flower/flower-networkpolicy.yaml"],
      )
  
      assert expected_ports == jmespath.search(
          "spec.ingress[0].ports", docs[0]
      )
  
imports: from __future__ import annotations
  import jmespath
  import pytest
  from tests.charts.helm_template_generator import render_chart
label_desc: Use image node_id 3 for calling the TestFlowerNetworkPolicy obj's underlying member method code with example usage: obj.test_ports_overrides(ports, expected_ports) without return types