From 12f66be21f10ebd6e6bf81fd62c9f37ea4aa4d6f Mon Sep 17 00:00:00 2001 From: mbasadi Date: Mon, 27 Nov 2023 22:45:43 -0500 Subject: [PATCH] try this package conflict --- .github/workflows/pullRequest.yml | 4 +--- requirements.in | 16 ---------------- requirements_dev.txt | 17 +++++++++++++++++ tests/test_notificationapi_identify_user.py | 9 +++++---- 4 files changed, 23 insertions(+), 23 deletions(-) delete mode 100644 requirements.in create mode 100644 requirements_dev.txt diff --git a/.github/workflows/pullRequest.yml b/.github/workflows/pullRequest.yml index d28f641..b4b03f9 100644 --- a/.github/workflows/pullRequest.yml +++ b/.github/workflows/pullRequest.yml @@ -26,9 +26,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pip-tools - pip-compile requirements.in - pip install -r requirements.txt + pip install -r requirements_dev.txt - name: Lint run: make lint diff --git a/requirements.in b/requirements.in deleted file mode 100644 index dee1df4..0000000 --- a/requirements.in +++ /dev/null @@ -1,16 +0,0 @@ -pip -bump2version -wheel -watchdog -flake8 -tox -coverage -Sphinx -twine -pytest -pytest-runner -respx -pytest-watch -bandit -pytest-asyncio -httpx \ No newline at end of file diff --git a/requirements_dev.txt b/requirements_dev.txt new file mode 100644 index 0000000..cf2e8b1 --- /dev/null +++ b/requirements_dev.txt @@ -0,0 +1,17 @@ +httpx==0.25.2 +pip==23.3.1 +bump2version==0.5.11 +wheel==0.33.6 +watchdog==0.9.0 +flake8==3.7.8 +tox==4.8.0 +coverage==4.5.4 +Sphinx==1.8.5 +twine==4.0.2 + +pytest==7.4.3 +pytest-runner==5.1 +pytest-watch==4.2.0 +bandit==1.7.4 +pytest-asyncio==0.21.1 +respx==0.20.2 \ No newline at end of file diff --git a/tests/test_notificationapi_identify_user.py b/tests/test_notificationapi_identify_user.py index 5d77346..f5492b4 100644 --- a/tests/test_notificationapi_identify_user.py +++ b/tests/test_notificationapi_identify_user.py @@ -3,10 +3,10 @@ """Tests for `notificationapi_python_server_sdk` package.""" import pytest -import json import hashlib import base64 import urllib.parse +import json from httpx import Response from notificationapi_python_server_sdk import notificationapi @@ -20,6 +20,7 @@ } +@pytest.mark.asyncio @pytest.mark.parametrize( "func,params", [ @@ -57,11 +58,11 @@ ), ], ) -async def test_makes_one_POST_api_call(respx_mock, func, params): - respx_mock.post(api_paths[func]).mock(return_value=Response(200)) +async def test_makes_one_post_api_call(respx_mock, func, params): + route = respx_mock.post(api_paths[func]).mock(return_value=Response(200)) notificationapi.init(client_id, client_secret) await getattr(notificationapi, func)(params) - assert respx_mock.called + assert route.called @pytest.mark.parametrize(