Fix ReadBuffer tests to run and test the right things
Without 'Test' in the class name, the test did not run at all. It would have caught #615. StringIO.closed is not assignable under Python 3, but we can just close() the fake stream to make it True. Reading from response.raw gives back bytes, not unicode, so the fake stream in the test case should do the same. And finally, ReadBuffer itself yields unicode, not UTF-8-encoded bytes. See https://github.com/tweepy/tweepy/pull/635 for the actual fix that this tests.
Please register or sign in to comment