Unpin requests

This commit is contained in:
Mike Helmick 2014-10-30 16:49:03 -04:00
parent e427281660
commit 02d1a946c1
3 changed files with 9 additions and 9 deletions

View file

@ -1,6 +1,6 @@
coverage==3.6.0
requests==2.1.0
requests_oauthlib==0.4.0
requests>=2.1.0
requests_oauthlib>=0.4.0
python-coveralls==2.1.0
nose-cov==1.6
responses==0.2.0
responses==0.3.0

View file

@ -23,7 +23,7 @@ if sys.argv[-1] == 'publish':
setup(
name='twython',
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_email='ryan@venodesigns.net',
license=open('LICENSE').read(),

View file

@ -262,16 +262,16 @@ class TwythonAPITestCase(unittest.TestCase):
"""Test getting last specific header of the last API call works"""
endpoint = 'statuses/home_timeline'
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)
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')
self.assertIsNone(value2)
value3 = self.api.get_lastfunction_header('not-there-either', 96)
self.assertEqual(96, value3)
value3 = self.api.get_lastfunction_header('not-there-either', '96')
self.assertEqual('96', value3)
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"""
@ -286,7 +286,7 @@ class TwythonAPITestCase(unittest.TestCase):
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
def test_construct_api_url(self):