Пример #1
0
    def test_max_id(self):
        """Ensure max_id offset works."""
        tweets_1 = _get_tweets()
        assert tweets_1

        # Select max_id from the first list
        max_id = tweets_1[3]['id']
        tweets_2 = _get_tweets(max_id=max_id)
        assert tweets_2

        # Make sure this id is not in the result, and all tweets are
        # older than max_id.
        for t in tweets_2:
            assert t['id'] < max_id
Пример #2
0
    def test_max_id(self):
        """Ensure max_id offset works."""
        tweets_1 = _get_tweets()
        assert tweets_1

        # Select max_id from the first list
        max_id = tweets_1[3]['id']
        tweets_2 = _get_tweets(max_id=max_id)
        assert tweets_2

        # Make sure this id is not in the result, and all tweets are
        # older than max_id.
        for t in tweets_2:
            assert t['id'] < max_id
Пример #3
0
 def test_newer_tweets_only(self):
     """Ensure that only tweets from the last CC_TWEETS_DAYS are shown"""
     tweets = _get_tweets()
     eq_(len(tweets), 12)
Пример #4
0
 def test_limit(self):
     """Do not return more than LIMIT tweets."""
     tweets = _get_tweets(limit=2)
     eq_(len(tweets), 2)
Пример #5
0
 def test_newer_tweets_only(self):
     """Ensure that only tweets from the last CC_TWEETS_DAYS are shown"""
     tweets = _get_tweets()
     eq_(len(tweets), 12)
Пример #6
0
 def test_limit(self):
     """Do not return more than LIMIT tweets."""
     tweets = _get_tweets(limit=2)
     eq_(len(tweets), 2)