Commit 05f4ab18 authored by Joshua Roesslein's avatar Joshua Roesslein
Browse files

Add tests for ResultSet.

parent 3619126a
import unittest
from tweepy.models import ResultSet
class NoIdItem(object): pass
class IdItem(object):
def __init__(self, id): = id
ids_fixture = [1, 10, 8, 50, 2, 100, 5]
class TweepyResultSetTests(unittest.TestCase):
def setUp(self):
self.results = ResultSet()
for i in ids_fixture:
def testids(self):
ids = self.results.ids()
self.assertListEqual(ids, ids_fixture)
def testmaxid(self):
self.assertEqual(self.results.max_id, 100)
def testsinceid(self):
self.assertEqual(self.results.since_id, 1)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment