From: Ruxandra Burtica Date: Tue, 8 Apr 2014 14:23:03 +0000 (+0300) Subject: Added failing test for connecting to userstream with parameters. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=91dd1d89890f472eae4a90532152d89b81766f35;p=tweepy.git Added failing test for connecting to userstream with parameters. --- 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()