Beispiel #1
0
def test_get_keys_no_json():
    json = "Error"
    jm = JSONManager(json)
    with pytest.raises(ValueError):
        x = jm.get_keys()
Beispiel #2
0
def test_get_keys():
    json = {"One": 1, "Two": 2}
    jm = JSONManager(json)
    x = jm.get_keys()
    assert x == ["One", "Two"]
Beispiel #3
0
def test_get_keys_empty():
    json = {}
    jm = JSONManager(json)
    x = jm.get_keys()
    assert x == []
 def get_keys(self):
     jm = JSONManager(json.loads(str(self.gpg.decrypt_content())))
     return jm.get_keys()