def test_key_bundle_update_2(): _kb = build_key_bundle(key_conf=KEYSPEC) diff = key_diff(_kb, KEYSPEC_4) update_key_bundle(_kb, diff) # There should be 3 keys assert len(_kb) == 4 # one RSA assert len(_kb.get("RSA")) == 2 # 2 EC assert len(_kb.get("EC")) == 2
def test_key_bundle_update_1(): _kb = build_key_bundle(key_conf=KEYSPEC) diff = key_diff(_kb, KEYSPEC_2) update_key_bundle(_kb, diff) # There should be 3 keys assert len(_kb) == 3 # one RSA assert len(_kb.get('RSA')) == 1 # 2 EC assert len(_kb.get('EC')) == 2
def test_key_bundle_update_3(): _kb = build_key_bundle(key_conf=KEYSPEC) diff = key_diff(_kb, KEYSPEC_5) update_key_bundle(_kb, diff) # There should be 3 keys assert len(_kb) == 3 # One inactive. Only active is implicit assert len(_kb.get()) == 2 # one inactive RSA assert len(_kb.get("RSA", only_active=False)) == 1 assert len(_kb.get("RSA")) == 0 # 2 EC assert len(_kb.get("EC")) == 2 assert len(_kb.get("EC", only_active=False)) == 2