def test_delete_tweet(self): """ Test deletion of tweets. Use the above tweets for deletion with the help of tweet_list :return: :rtype: """ t = Twitter(**twitter_access) # Get current latest tweet ID latest_tweet = t.get_user_timeline(user=twitter_username, count=1) latest_tweet_id = latest_tweet[0].get('id') self.assertNotEqual(latest_tweet_id, _read_id_top_tweet()) # Delete all test tweets for tweet_id in _get_test_tweets(): output = t.delete_tweet(tweet_id=tweet_id) self.assertEqual(tweet_id, output.get('id')) # Get lates tweet ID after deletion latest_tweet = t.get_user_timeline(user=twitter_username, count=1) latest_tweet_id = latest_tweet[0].get('id') self.assertEqual(latest_tweet_id, _read_id_top_tweet())