Skip to content

Commit

Permalink
tests: Python 2.6's unittest module is terrible.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrippa committed Mar 28, 2014
1 parent 5ebf5af commit cd1bf03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_plugin_api_http_session.py
Expand Up @@ -8,12 +8,13 @@ class TestPluginAPIHTTPSession(unittest.TestCase):
def test_read_timeout(self):
session = HTTPSession()

with self.assertRaises(PluginError):
def stream_data():
res = session.get("http://httpbin.org/delay/6",
timeout=3, stream=True)
next(res.iter_content(8192))


self.assertRaises(PluginError, stream_data)

if __name__ == "__main__":
unittest.main()

0 comments on commit cd1bf03

Please sign in to comment.