From 91dd1d89890f472eae4a90532152d89b81766f35 Mon Sep 17 00:00:00 2001 From: Ruxandra Burtica Date: Tue, 8 Apr 2014 17:23:03 +0300 Subject: [PATCH] Added failing test for connecting to userstream with parameters. --- tests/test_streaming.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_streaming.py b/tests/test_streaming.py index b80b7e4..dad4229 100644 --- a/tests/test_streaming.py +++ b/tests/test_streaming.py @@ -55,6 +55,16 @@ class TweepyStreamTests(unittest.TestCase): self.stream.userstream() self.assertEqual(self.listener.status_count, 1) + def test_userstream_with_params(self): + # Generate random tweet which should show up in the stream. + def on_connect(): + API(self.auth).update_status(mock_tweet()) + + self.listener.connect_cb = on_connect + self.listener.status_stop_count = 1 + self.stream.userstream(_with='user', replies='all', stall_warnings=True) + self.assertEqual(self.listener.status_count, 1) + def test_sample(self): self.listener.status_stop_count = 10 self.stream.sample() -- 2.25.1