test_data = [{'field1': 'value1',
'field2': 1},
{'field1': 'value3',
'field2': 2}
]
schema = Schema([
{Required('field1'): 'value1',
Required('field2'): int},
{Required('field1'): 'value3',
Required('field2'): int}
])
assert schema(test_data)
How to check that the list contains 2 dictionaries with the structure shown above? When I try to check for a full match, I get an error: voluptuous.error.MultipleInvalid: not a valid value for dictionary value @ data[1]['field1']