def test_personal_stream_cursor(self): network = Livefyre.get_network(self.NETWORK_NAME, self.NETWORK_KEY) date = datetime.datetime.now() ps_resource = 'urn:livefyre:{0}:user={1}:personalStream'.format(network.data.name, self.USER_ID) cursor = CursorFactory.get_personal_stream_cursor(network, self.USER_ID) self.assertEqual(ps_resource, cursor.data.resource) cursor = CursorFactory.get_personal_stream_cursor(network, self.USER_ID, self.LIMIT, date) self.assertEqual(ps_resource, cursor.data.resource) self.assertEqual(self.LIMIT, cursor.data.limit)
def test_api_calls(self): network = Livefyre.get_network(self.NETWORK_NAME, self.NETWORK_KEY) cursor = CursorFactory.get_personal_stream_cursor(network, self.USER_ID) cursor.next_items() json = cursor.previous_items() self.assertTrue(json)