waveaccounting/dj-inmemorystorage — pull request #3 by AndrewPashkin (2014-06-01 11:10:31+00:00)
Title: Test for the bug with TypeError while saving BytesIO object.

This test reproduces the bug I encountered with Python3.3:
`TypeError: string argument expected, got 'bytes'`

It happens because [this method](https://github.com/waveaccounting/dj-inmemorystorage/blob/8271892c6966423633e7e0e11ede438cc2efeede/inmemorystorage/storage.py#L139) does not taking in attention type of a content being saved, and `InMemoryFile` uses `StringIO` by default. `InMemoryDir` opens file and then tries to write `bytes` to it, and it produces a bug. I have no idea rigt now, how would be better to fix this.