diff --git a/tests/test_plugin_api_http_session.py b/tests/test_plugin_api_http_session.py index b0c24da2..a30f8118 100644 --- a/tests/test_plugin_api_http_session.py +++ b/tests/test_plugin_api_http_session.py @@ -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()