Regression test for #518
authorYuri Prezument <y@yprez.com>
Mon, 1 Dec 2014 13:53:27 +0000 (15:53 +0200)
committerYuri Prezument <y@yprez.com>
Mon, 1 Dec 2014 14:15:02 +0000 (16:15 +0200)
tests/test_cursors.py

index e197b909d6be0c11c2e1bdb7ec8a7361ca7e366c..4c1b10bc9ca1279d3b0b7964033e75ed53ae43d9 100644 (file)
@@ -43,3 +43,13 @@ class TweepyCursorTests(TweepyTestCase):
         self.assertEqual(c.iterator.next_cursor, 123456)
         self.assertFalse('cursor' in c.iterator.kargs)
 
+    @tape.use_cassette('testcursornext.json')
+    def testcursornext(self):
+        """
+        Test cursor.next() behavior, id being passed correctly.
+        Regression test for issue #518
+        """
+        cursor = Cursor(self.api.user_timeline, id='twitter').items(5)
+        status = cursor.next()
+
+        self.assertEquals(status.user.screen_name, 'twitter')