Fix ReadBuffer tests to run and test the right things
authorWill Thompson <will@willthompson.co.uk>
Tue, 6 Oct 2015 22:14:55 +0000 (23:14 +0100)
committerWill Thompson <will@willthompson.co.uk>
Wed, 7 Oct 2015 07:49:56 +0000 (08:49 +0100)
commit3a061c4b0053b4e145fe35c1b30a5451a27c0963
treeff60a262118b8cb8e1367fb4200e987c9ee847fa
parent22c0bc029546478da50c46100ad3804863138158
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.
tests/test_streaming.py