def test_network_topic(self):
     topic = PersonalizedStream.create_or_update_topic(self.network, '1', 'UN')
     t = PersonalizedStream.get_topic(self.network, 1)
     self.assertTrue(t)
     self.assertEqual(t.label, topic.label)
     
     self.assertTrue(PersonalizedStream.delete_topic(self.network, topic))
 def test_site_topic(self):
     topic = PersonalizedStream.create_or_update_topic(self.site, '2', 'DEUX')
     
     t = PersonalizedStream.get_topic(self.site, 2)
     self.assertTrue(t)
     self.assertEqual(t.label, topic.label)
     
     self.assertTrue(PersonalizedStream.delete_topic(self.site, topic))
 def test_timeline_cursor(self):
     topic = PersonalizedStream.create_or_update_topic(self.network, '1', 'UN')
     cursor = TimelineCursor.init(self.network, topic.topic_id +":topicStream", 50, datetime.datetime.now())
     
     data = PersonalizedStream.get_timeline_stream(cursor, True)
     self.assertTrue(data)
     
     PersonalizedStream.delete_topic(self.network, topic)