• Will Thompson's avatar
    Fix ReadBuffer tests to run and test the right things · 3a061c4b
    Will Thompson authored
    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.
    3a061c4b
test_streaming.py 7.75 KB