MCPcopy Index your code
hub / github.com/kubernetes-client/python / test_get_by_key

Method test_get_by_key

kubernetes/test/test_informer.py:89–93  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

87 self.assertIn("default/p2", keys)
88
89 def test_get_by_key(self):
90 pod = _make_pod("default", "p1")
91 self.cache._put(pod)
92 self.assertIs(self.cache.get_by_key("default/p1"), pod)
93 self.assertIsNone(self.cache.get_by_key("default/ghost"))
94
95 def test_get(self):
96 pod = _make_pod("kube-system", "coredns")

Callers

nothing calls this directly

Calls 3

_make_podFunction · 0.85
_putMethod · 0.80
get_by_keyMethod · 0.80

Tested by

no test coverage detected