Fix URLs for multiple media in html_for_tweet() #461

Merged
philgyford merged 8 commits from fix-media-in-html-for-tweet into master 2017-10-13 06:42:17 -07:00
Showing only changes of commit d3f5361f4d - Show all commits

View file

@ -1,5 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import json import json
import os
from twython import Twython, TwythonError from twython import Twython, TwythonError
@ -11,7 +12,11 @@ class TestHtmlForTweetTestCase(unittest.TestCase):
self.api = Twython('', '', '', '') self.api = Twython('', '', '', '')
def load_tweet(self, name): def load_tweet(self, name):
f = open('tests/tweets/%s.json' % name) f = open(os.path.join(
os.path.dirname(__file__),
'tweets',
'%s.json' % name
))
tweet = json.load(f) tweet = json.load(f)
f.close() f.close()
return tweet return tweet