Skip to content

Commit

Permalink
specify schema for reading
Browse files Browse the repository at this point in the history
  • Loading branch information
smn committed Feb 13, 2015
1 parent 5dfe840 commit fe7942e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion elasticgit/commands/tests/test_avro.py
Expand Up @@ -400,7 +400,9 @@ def assertBinaryRoundTrip(self, model_class, data):
with DataFileWriter(fp, DatumWriter(), schema) as writer:
writer.append(dict(model))

with DataFileReader(open(file_name, 'rb'), DatumReader()) as reader:
with DataFileReader(
open(file_name, 'rb'),
DatumReader(readers_schema=schema)) as reader:
[row] = reader
self.assertEqual(model, model_class(row))

Expand Down

0 comments on commit fe7942e

Please sign in to comment.