Try to fix loading of JSON files in tests on Travis
This commit is contained in:
parent
5a008e7e77
commit
d3f5361f4d
1 changed files with 6 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import json
|
||||
import os
|
||||
|
||||
from twython import Twython, TwythonError
|
||||
|
||||
|
|
@ -11,7 +12,11 @@ class TestHtmlForTweetTestCase(unittest.TestCase):
|
|||
self.api = Twython('', '', '', '')
|
||||
|
||||
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)
|
||||
f.close()
|
||||
return tweet
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue