Esempio n. 1
0
    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)
Esempio n. 2
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))
Esempio n. 3
0
    def test_retweet(self):
        api_twipy = tests.create_api()

        status = tests.create_status()

        api_twipy.retweet(tweet_id=status.id_str)
Esempio n. 4
0
    def test_create_fav(self):
        api_twipy = tests.create_api()

        tweet = tests.create_status()

        api_twipy.create_fav(tweet_id=tweet.id_str)
Esempio n. 5
0
    def test_get_favs(self):
        api_twipy = tests.create_api()

        api_twipy.get_favs()
Esempio n. 6
0
    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)
Esempio n. 7
0
    def test_get_direct_messages(self):
        api_twipy = tests.create_api()

        api_twipy.get_direct_messages()
Esempio n. 8
0
    def test_send_direct_message(self):
        api_twipy = tests.create_api()

        api_twipy.send_direct_message(text=SHORT_TEXT, screen_name=tests.screen_name)
Esempio n. 9
0
    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)
Esempio n. 10
0
    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)
Esempio n. 11
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))