From f5e3d263967f9b2a98360a25f4a73d031b7efa53 Mon Sep 17 00:00:00 2001 From: YegorZh Date: Fri, 10 Jan 2025 09:25:12 +0000 Subject: [PATCH 1/2] version upgrade to 1.0.2 --- setup.py | 2 +- unit/utils/configuration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 32edc02..75c46fe 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='unit-python-sdk', packages=['unit', 'unit.api', 'unit.models', 'unit.utils'], - version="1.0.1", + version="1.0.2", license='Mozilla Public License 2.0', description='This library provides a python wrapper to http://unit.co API. See https://docs.unit.co/', author='unit.co', diff --git a/unit/utils/configuration.py b/unit/utils/configuration.py index 1878c25..2d898af 100644 --- a/unit/utils/configuration.py +++ b/unit/utils/configuration.py @@ -9,7 +9,7 @@ def get_headers(self): return { "content-type": "application/vnd.api+json", "authorization": f"Bearer {self.token}", - "X-UNIT-SDK": f"unit-python-sdk@v1.0.1" + "X-UNIT-SDK": f"unit-python-sdk@v1.0.2" } def set_api_url(self, api_url): From 375af63450d7dfc281657b8ad2d8743794ee5113 Mon Sep 17 00:00:00 2001 From: YegorZh Date: Fri, 10 Jan 2025 10:01:15 +0000 Subject: [PATCH 2/2] fix: fixed test_list_with_wrong_parameters test --- e2e_tests/authorization_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e_tests/authorization_test.py b/e2e_tests/authorization_test.py index b6fa956..bc5bd10 100644 --- a/e2e_tests/authorization_test.py +++ b/e2e_tests/authorization_test.py @@ -51,7 +51,7 @@ def test_list_with_parameters(): def test_list_with_wrong_parameters(): params = ListAuthorizationParams(10, 0, "", "-1", include_non_authorized=False) response = client.authorizations.list(params) - assert response.data == [] + assert len(response.errors) > 0 def test_authorization_api_response(): authorization_api_response = {