File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change
1
+ httreplay == 0.1.4
Original file line number Diff line number Diff line change 2
2
#from distutils.core import setup
3
3
from setuptools import setup , find_packages
4
4
from tweepy import __version__
5
+ from pip .req import parse_requirements
6
+
7
+ install_reqs = parse_requirements ('requirements.txt' )
8
+ reqs = [str (req .req ) for req in install_reqs ]
5
9
6
10
setup (name = "tweepy" ,
7
11
version = __version__ ,
11
15
author_email = "tweepy@googlegroups.com" ,
12
16
url = "http://github.com/tweepy/tweepy" ,
13
17
packages = find_packages (),
18
+ install_requires = reqs ,
14
19
keywords = "twitter library" ,
15
20
zip_safe = True )
Original file line number Diff line number Diff line change 9
9
MemoryCache , FileCache )
10
10
11
11
from config import *
12
+ from httreplay import start_replay , stop_replay
13
+ from httreplay .utils import filter_headers_key
14
+ import os
12
15
13
16
test_tweet_id = '266367358078169089'
14
17
@@ -30,12 +33,17 @@ def testpickle(self):
30
33
class TweepyAPITests (unittest .TestCase ):
31
34
32
35
def setUp (self ):
36
+ if os .environ ['TRAVIS_SECURE_ENV_VARS' ] == 'false' :
37
+ start_replay ('records/test.json' , headers_key = filter_headers_key (['Authorization' ]))
33
38
auth = OAuthHandler (oauth_consumer_key , oauth_consumer_secret )
34
39
auth .set_access_token (oauth_token , oauth_token_secret )
35
40
self .api = API (auth )
36
41
self .api .retry_count = 2
37
42
self .api .retry_delay = 5
38
43
44
+ def tearDown (self ):
45
+ stop_replay ()
46
+
39
47
# TODO: Actually have some sort of better assertion
40
48
def testgetoembed (self ):
41
49
data = self .api .get_oembed (test_tweet_id )
You can’t perform that action at this time.
0 commit comments