Fix resetting of FakeStream

This commit is contained in:
Anthony Sottile 2017-07-22 15:57:37 -07:00
parent dd182fb42e
commit a6a4762f0d

View file

@ -170,7 +170,7 @@ class Fixture(object):
def get_bytes(self): def get_bytes(self):
"""Get the output as-if no encoding occurred""" """Get the output as-if no encoding occurred"""
data = self._stream.data.getvalue() data = self._stream.data.getvalue()
self._stream = io.BytesIO() self._stream.data.truncate(0)
return data return data
def get(self): def get(self):