def test_create_timeline_object(self): api_twipy = tests.create_api() content = api_twipy.get_home_time_line() adapter = Adapter() timeline = adapter.create_timeline_object(content) self.assertTrue(isinstance(timeline, Timeline)) self.assertGreater(len(timeline.statuses), 0)
def test_cli_adapter(self): api_twipy = tests.create_api() content = api_twipy.get_home_time_line() adapter = Adapter() timeline = adapter.create_timeline_object(content) cli_adapter = CliAdapter(timeline) self.assertTrue(isinstance(cli_adapter, CliAdapter))
def test_retweet(self): api_twipy = tests.create_api() status = tests.create_status() api_twipy.retweet(tweet_id=status.id_str)
def test_create_fav(self): api_twipy = tests.create_api() tweet = tests.create_status() api_twipy.create_fav(tweet_id=tweet.id_str)
def test_get_favs(self): api_twipy = tests.create_api() api_twipy.get_favs()
def test_get_mentions(self): api_twipy = tests.create_api() content = api_twipy.get_mentions() self.assertTrue(isinstance(content, str)) self.assertGreater(len(content), 0)
def test_get_direct_messages(self): api_twipy = tests.create_api() api_twipy.get_direct_messages()
def test_send_direct_message(self): api_twipy = tests.create_api() api_twipy.send_direct_message(text=SHORT_TEXT, screen_name=tests.screen_name)
def test_update_status(self): api_twipy = tests.create_api() api_twipy.update_status(text=SHORT_TEXT) api_twipy.update_status(text=LONG_TEXT) api_twipy.update_status(text=SHORT_TEXT + LINK + SHORT_TEXT)
def test_get_home_timeline(self): api_twipy = tests.create_api() content = api_twipy.get_home_time_line() self.assertTrue(isinstance(content, str)) self.assertGreater(len(content), 0)
def test_consumer_keys(self): api_twipy = tests.create_api() self.assertTrue(isinstance(api_twipy._consumer_key, str)) self.assertTrue(isinstance(api_twipy._consumer_secret, str))