def write(self, data): FakeFile._data = data BytesIO.flush(self) BytesIO.write(self, data)
def free(self): BytesIO.close(self)