def test_validate_two_extra_at_once(): # arrange verdict = Verdict().set_malware_family("Eicar") # act verdict.add_extras([("new_key", "string_value"), ("new_key1", { "other_key": "string_value" })]) # assert assert Verdict.validate(json.loads(verdict.json()))
def test_add_two_extras_at_once(): # arrange verdict = Verdict().set_malware_family("Eicar") # act verdict.add_extras([("new_key", "string_value"), ("new_key1", { "other_key": "string_value" })]) # assert k, v = verdict.extra[0] assert k == 'new_key' assert v == "string_value" k, v = verdict.extra[1] assert k == 'new_key1' assert v == {"other_key": "string_value"}