[tests] simplify assertion

This commit is contained in:
Romain Dorgueil
2017-10-28 17:24:26 +02:00
parent 7d9b547a53
commit efb31126b4

View File

@ -44,18 +44,18 @@ def test_read_csv_from_file_kwargs(tmpdir):
CsvReader(path=filename, delimiter=','), CsvReader(path=filename, delimiter=','),
services=services, services=services,
) as context: ) as context:
context.write(BEGIN, Bag(), END) context.write_sync(())
context.step()
output = context.get_buffer()
assert len(output) == 2 assert context.get_buffer() == [
assert output[0] == { {
'a': 'a foo', 'a': 'a foo',
'b': 'b foo', 'b': 'b foo',
'c': 'c foo', 'c': 'c foo',
} },
assert output[1] == { {
'a': 'a bar', 'a': 'a bar',
'b': 'b bar', 'b': 'b bar',
'c': 'c bar', 'c': 'c bar',
} }
]