From 305737ec00882f667455b9aa7192cc01696ad0f4 Mon Sep 17 00:00:00 2001 From: hiranya911 Date: Mon, 23 Dec 2019 13:57:04 -0800 Subject: [PATCH 1/2] Upgraded cachecontrol to latest --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index fd73d36bd..cc4534b03 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ pytest-cov >= 2.4.0 pytest-localserver >= 0.4.1 tox >= 3.6.0 -cachecontrol >= 0.12.4 +cachecontrol >= 0.12.6 google-api-core[grpc] >= 1.14.0, < 2.0.0dev; platform.python_implementation != 'PyPy' google-api-python-client >= 1.7.8 google-cloud-firestore >= 1.4.0; platform.python_implementation != 'PyPy' diff --git a/setup.py b/setup.py index a3cce8be5..cb698f774 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ long_description = ('The Firebase Admin Python SDK enables server-side (backend) Python developers ' 'to integrate Firebase into their services and applications.') install_requires = [ - 'cachecontrol>=0.12.4', + 'cachecontrol>=0.12.6', 'google-api-core[grpc] >= 1.14.0, < 2.0.0dev; platform.python_implementation != "PyPy"', 'google-api-python-client >= 1.7.8', 'google-cloud-firestore>=1.4.0; platform.python_implementation != "PyPy"', From c1d66fa19a8febce7ef8b31fcf1d0e6af414d3c3 Mon Sep 17 00:00:00 2001 From: hiranya911 Date: Mon, 23 Dec 2019 14:11:55 -0800 Subject: [PATCH 2/2] Fixing some failing requests tests --- tests/test_db.py | 2 +- tests/test_messaging.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_db.py b/tests/test_db.py index 081c31e3d..e9f8f7dda 100644 --- a/tests/test_db.py +++ b/tests/test_db.py @@ -819,7 +819,7 @@ def test_http_timeout(self): assert ref._client.timeout == 60 assert ref.get() == {} assert len(recorder) == 1 - assert recorder[0]._extra_kwargs['timeout'] == 60 + assert recorder[0]._extra_kwargs['timeout'] == pytest.approx(60, 0.001) def test_app_delete(self): app = firebase_admin.initialize_app( diff --git a/tests/test_messaging.py b/tests/test_messaging.py index 040f84023..96b512577 100644 --- a/tests/test_messaging.py +++ b/tests/test_messaging.py @@ -1562,7 +1562,7 @@ def test_send(self): msg = messaging.Message(topic='foo') messaging.send(msg) assert len(self.recorder) == 1 - assert self.recorder[0]._extra_kwargs['timeout'] == 4 + assert self.recorder[0]._extra_kwargs['timeout'] == pytest.approx(4, 0.001) def test_topic_management_timeout(self): self.fcm_service._client.session.mount( @@ -1574,7 +1574,7 @@ def test_topic_management_timeout(self): ) messaging.subscribe_to_topic(['1'], 'a') assert len(self.recorder) == 1 - assert self.recorder[0]._extra_kwargs['timeout'] == 4 + assert self.recorder[0]._extra_kwargs['timeout'] == pytest.approx(4, 0.001) class TestSend(object):