Unpin requests
This commit is contained in:
parent
e427281660
commit
02d1a946c1
3 changed files with 9 additions and 9 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
coverage==3.6.0
|
coverage==3.6.0
|
||||||
requests==2.1.0
|
requests>=2.1.0
|
||||||
requests_oauthlib==0.4.0
|
requests_oauthlib>=0.4.0
|
||||||
python-coveralls==2.1.0
|
python-coveralls==2.1.0
|
||||||
nose-cov==1.6
|
nose-cov==1.6
|
||||||
responses==0.2.0
|
responses==0.3.0
|
||||||
|
|
|
||||||
2
setup.py
2
setup.py
|
|
@ -23,7 +23,7 @@ if sys.argv[-1] == 'publish':
|
||||||
setup(
|
setup(
|
||||||
name='twython',
|
name='twython',
|
||||||
version=__version__,
|
version=__version__,
|
||||||
install_requires=['requests2.1.0', 'requests_oauthlib==0.4.0'],
|
install_requires=['requests>=2.1.0', 'requests_oauthlib>=0.4.0'],
|
||||||
author='Ryan McGrath',
|
author='Ryan McGrath',
|
||||||
author_email='ryan@venodesigns.net',
|
author_email='ryan@venodesigns.net',
|
||||||
license=open('LICENSE').read(),
|
license=open('LICENSE').read(),
|
||||||
|
|
|
||||||
|
|
@ -262,16 +262,16 @@ class TwythonAPITestCase(unittest.TestCase):
|
||||||
"""Test getting last specific header of the last API call works"""
|
"""Test getting last specific header of the last API call works"""
|
||||||
endpoint = 'statuses/home_timeline'
|
endpoint = 'statuses/home_timeline'
|
||||||
url = self.get_url(endpoint)
|
url = self.get_url(endpoint)
|
||||||
self.register_response(responses.GET, url, adding_headers={'x-rate-limit-remaining': 37})
|
self.register_response(responses.GET, url, adding_headers={'x-rate-limit-remaining': '37'})
|
||||||
|
|
||||||
self.api.get(endpoint)
|
self.api.get(endpoint)
|
||||||
|
|
||||||
value = self.api.get_lastfunction_header('x-rate-limit-remaining')
|
value = self.api.get_lastfunction_header('x-rate-limit-remaining')
|
||||||
self.assertEqual(37, value)
|
self.assertEqual('37', value)
|
||||||
value2 = self.api.get_lastfunction_header('does-not-exist')
|
value2 = self.api.get_lastfunction_header('does-not-exist')
|
||||||
self.assertIsNone(value2)
|
self.assertIsNone(value2)
|
||||||
value3 = self.api.get_lastfunction_header('not-there-either', 96)
|
value3 = self.api.get_lastfunction_header('not-there-either', '96')
|
||||||
self.assertEqual(96, value3)
|
self.assertEqual('96', value3)
|
||||||
|
|
||||||
def test_get_lastfunction_header_should_raise_error_when_no_previous_call(self):
|
def test_get_lastfunction_header_should_raise_error_when_no_previous_call(self):
|
||||||
"""Test attempting to get a header when no API call was made raises a TwythonError"""
|
"""Test attempting to get a header when no API call was made raises a TwythonError"""
|
||||||
|
|
@ -286,7 +286,7 @@ class TwythonAPITestCase(unittest.TestCase):
|
||||||
|
|
||||||
self.api.get(endpoint)
|
self.api.get(endpoint)
|
||||||
|
|
||||||
self.assertEqual(b'gzip, deflate, compress', responses.calls[0].request.headers['Accept-Encoding'])
|
self.assertEqual(b'gzip, deflate', responses.calls[0].request.headers['Accept-Encoding'])
|
||||||
|
|
||||||
# Static methods
|
# Static methods
|
||||||
def test_construct_api_url(self):
|
def test_construct_api_url(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue