use BytesIO to work with python3

This commit is contained in:
Mark Riedesel 2017-01-07 14:52:33 -06:00
parent 16bf2c41d0
commit 9320c68961
3 changed files with 14 additions and 13 deletions

View file

@ -37,7 +37,7 @@ def test_dump():
record.EmployerRecord(),
record.EmployeeWageRecord(),
]
out = io.StringIO()
out = io.BytesIO()
dump(records, out)
return out
@ -75,7 +75,7 @@ def load(fp):
def loads(s):
import io
fp = io.StringIO(s)
fp = io.BytesIO(s)
return load(fp)
@ -85,7 +85,7 @@ def dump(records, fp):
def dumps(records):
import io
fp = io.StringIO()
fp = io.BytesIO()
dump(records, fp)
fp.seek(0)
return fp.read()