Exemple #1
0
 def test_fetch_urls_to_warc(self):
     sample_tweet = testdata["statuses"][1]
     result = binhydrate.parse_binlinks_from_tweet(sample_tweet)
     binhydrate.fetch_urls_to_warc(result, "test.warc.gz")
Exemple #2
0
 def test_return_image_tweet_links(self):
     sample_tweet = testdata["statuses"][2]
     result = binhydrate.parse_binlinks_from_tweet(sample_tweet)
     self.assertEqual(3, len(result))
Exemple #3
0
 def test_return_profile_links_for_text_tweet(self):
     sample_tweet = testdata["statuses"][0]
     result = binhydrate.parse_binlinks_from_tweet(sample_tweet)
     self.assertEqual(2, len(result))
Exemple #4
0
 def test_return_video_and_profile_links(self):
     sample_tweet = testdata["statuses"][1]
     result = binhydrate.parse_binlinks_from_tweet(sample_tweet)
     self.assertEqual(4, len(result))
Exemple #5
0
 def test_return_empy_list_parse_binlinks_from_tweet(self):
     empty_tweet = dict()
     result = binhydrate.parse_binlinks_from_tweet(empty_tweet)
     self.assertEqual([], result)