示例#1
0
def test_get_empty(ns_resource):
    k = Kubernetes(body=ns_resource['body'])
    assert k._gethash(k.obj) is None
示例#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']