Beispiel #1
0
def test_get_empty(ns_resource):
    k = Kubernetes(body=ns_resource['body'])
    assert k._gethash(k.obj) is None
Beispiel #2
0
def test_get_hash(svc_resource):
    ks = Kubernetes(body=svc_resource['body'])
    kbody = json.loads(svc_resource['body'])
    rhash = ks._gethash(kbody)
    assert rhash == kbody['metadata']['annotations']['resource.appr/hash']