def test_get_items_since(self): params = self.default_params params['access_token'] = self.access_token client = StoryStreamClient('storystream-test-sto', **params) initial_blocks = client.get_blocks(rpp=8)['blocks'] since_id = initial_blocks[4].content_block_id results = client.get_blocks(since_id=since_id) self.assertIsNotNone(results) self.assertEqual(len(results['blocks']), 4, msg='%s blocks returned' % len(results['blocks']))
def test_get_blocks_from(self): params = self.default_params params['access_token'] = self.access_token client = StoryStreamClient('storystream-test-sto', **params) results = client.get_blocks(rpp=3) self.assertIsNotNone(results) self.assertTrue(len(results['blocks']) == 3, msg='%s blocks returned' % len(results['blocks']))