diff --git a/dev_requirements.txt b/dev_requirements.txt index af40ff47..ce02ede0 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -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 diff --git a/requirements.txt b/requirements.txt index 8ee3e7d6..d0b897e0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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' diff --git a/setup.py b/setup.py index 6e832998..5113a34d 100644 --- a/setup.py +++ b/setup.py @@ -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'", diff --git a/tests/test_steamid.py b/tests/test_steamid.py index 269a2cf7..f4fba3a6 100644 --- a/tests/test_steamid.py +++ b/tests/test_steamid.py @@ -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, ): diff --git a/tests/test_webapi.py b/tests/test_webapi.py index 82c70d01..6adb6c16 100644 --- a/tests/test_webapi.py +++ b/tests/test_webapi.py @@ -30,7 +30,7 @@ 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' @@ -38,27 +38,27 @@ def setUp(self): 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={ @@ -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={