def test_remove_identity_key_with_valid_empty_input(): """ Given: - Dictionary with three nested objects When - When Parsing outputs to context Then - Dictionary to remove to first key and add it as an item in the dictionary """ res = remove_identity_key("") assert res == ""
def test_remove_identity_key_with_invalid_object(): """ Given: - Dictionary with three nested objects When - When Parsing outputs to context Then - Dictionary to remove to first key and add it as an item in the dictionary """ object = "not a dict" res = remove_identity_key(object) assert res == object
def test_remove_identity_key_with_valid_user_input(): """ Given: - Dictionary with three nested objects which the creator type is "user" and system account When - When Parsing outputs to context Then - Dictionary to remove to first key and add it as an item in the dictionary """ res = remove_identity_key( arguments["remove_identifier_data_user_type"]["CreatedBy"]) assert len(res.keys()) > 1 and res.get("Type") assert res.get("ID") is None