예제 #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)
예제 #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))
예제 #3
0
    def test_retweet(self):
        api_twipy = tests.create_api()

        status = tests.create_status()

        api_twipy.retweet(tweet_id=status.id_str)
예제 #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)
예제 #5
0
    def test_get_favs(self):
        api_twipy = tests.create_api()

        api_twipy.get_favs()
예제 #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)
예제 #7
0
    def test_get_direct_messages(self):
        api_twipy = tests.create_api()

        api_twipy.get_direct_messages()
예제 #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)
예제 #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)
예제 #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)
예제 #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))