Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove urllib3 pin #466

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

-r requirements.txt

vcrpy==2.0.1
# https://github.com/kevin1024/vcrpy/issues/719
vcrpy>=4.4.0
PyYAML>=5.4
mock==1.3.0

Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
six>=1.10.0
pycryptodomex>=3.7.0
requests>=2.9.1
urllib3<2
vdf>=3.3
gevent>=1.3.0
protobuf~=3.0; python_version >= '3'
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
'six>=1.10',
'pycryptodomex>=3.7.0',
'requests>=2.9.1',
'urllib3<2',
'vdf>=3.3',
'cachetools>=3.0.0',
"win-inet-pton; python_version == '2.7' and sys_platform == 'win32'",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_steamid.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def scrub_resp(r):
mode='once',
serializer='yaml',
filter_query_parameters=['nocache'],
decode_compressed_response=False,
decode_compressed_response=True,
before_record_request=scrub_req,
before_record_response=scrub_resp,
):
Expand Down
14 changes: 7 additions & 7 deletions tests/test_webapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,35 +30,35 @@ def scrub_resp(r):
)

class TCwebapi(unittest.TestCase):
@test_vcr.use_cassette('webapi.yaml')
@test_vcr.use_cassette('webapi.yaml', decode_compressed_response=True)
def setUp(self):
self.api = WebAPI(test_api_key)
self.api.session.headers['Accept-Encoding'] = 'identity'

def test_docs(self):
self.assertTrue(len(self.api.doc()) > 0)

@test_vcr.use_cassette('webapi.yaml')
@test_vcr.use_cassette('webapi.yaml', decode_compressed_response=True)
def test_simple_api_call(self):
resp = self.api.ISteamWebAPIUtil.GetServerInfo_v1()
self.assertTrue('servertime' in resp)

@test_vcr.use_cassette('webapi.yaml')
@test_vcr.use_cassette('webapi.yaml', decode_compressed_response=True)
def test_simple_api_call_vdf(self):
resp = self.api.ISteamWebAPIUtil.GetServerInfo(format='vdf')
self.assertTrue('servertime' in resp['response'])

@test_vcr.use_cassette('webapi.yaml')
@test_vcr.use_cassette('webapi.yaml', decode_compressed_response=True)
def test_resolve_vanity(self):
resp = self.api.ISteamUser.ResolveVanityURL(vanityurl='valve', url_type=2)
self.assertEqual(resp['response']['steamid'], '103582791429521412')

@test_vcr.use_cassette('webapi.yaml')
@test_vcr.use_cassette('webapi.yaml', decode_compressed_response=True)
def test_post_publishedfile(self):
resp = self.api.ISteamRemoteStorage.GetPublishedFileDetails(itemcount=5, publishedfileids=[1,1,1,1,1])
self.assertEqual(resp['response']['resultcount'], 5)

@test_vcr.use_cassette('webapi.yaml')
@test_vcr.use_cassette('webapi.yaml', decode_compressed_response=True)
def test_get(self):
resp = webapi.get('ISteamUser', 'ResolveVanityURL', 1,
session=self.api.session, params={
Expand All @@ -68,7 +68,7 @@ def test_get(self):
})
self.assertEqual(resp['response']['steamid'], '103582791429521412')

@test_vcr.use_cassette('webapi.yaml')
@test_vcr.use_cassette('webapi.yaml', decode_compressed_response=True)
def test_post(self):
resp = webapi.post('ISteamRemoteStorage', 'GetPublishedFileDetails', 1,
session=self.api.session, params={
Expand Down