diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fcb5356b6..035402bf1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,7 @@ repos: - id: isort args: ["--profile", "black"] - repo: https://github.com/psf/black - rev: 25.1.0 + rev: 24.10.0 hooks: - id: black language_version: python3 @@ -29,19 +29,22 @@ repos: - id: pyupgrade args: [--py38-plus] - repo: https://github.com/pycqa/flake8 - rev: 7.2.0 + rev: 7.1.2 hooks: - id: flake8 additional_dependencies: [Flake8-pyproject] - repo: https://github.com/python-poetry/poetry rev: 2.1.3 hooks: - - id: poetry-export - files: pyproject.toml - id: poetry-lock files: pyproject.toml - id: poetry-check files: pyproject.toml + - repo: https://github.com/python-poetry/poetry-plugin-export + rev: 1.9.0 + hooks: + - id: poetry-export + files: pyproject.toml - repo: https://github.com/pre-commit/pre-commit rev: v4.2.0 hooks: diff --git a/descope/__init__.py b/descope/__init__.py index 7e71f2f6e..5cd79beac 100644 --- a/descope/__init__.py +++ b/descope/__init__.py @@ -39,3 +39,37 @@ UserPasswordFirebase, UserPasswordPbkdf2, ) + +__all__ = [ + "COOKIE_DATA_NAME", + "REFRESH_SESSION_COOKIE_NAME", + "REFRESH_SESSION_TOKEN_NAME", + "SESSION_COOKIE_NAME", + "SESSION_TOKEN_NAME", + "AccessKeyLoginOptions", + "DeliveryMethod", + "LoginOptions", + "SignUpOptions", + "DescopeClient", + "API_RATE_LIMIT_RETRY_AFTER_HEADER", + "ERROR_TYPE_API_RATE_LIMIT", + "ERROR_TYPE_SERVER_ERROR", + "AuthException", + "RateLimitException", + "AssociatedTenant", + "SAMLIDPAttributeMappingInfo", + "SAMLIDPGroupsMappingInfo", + "SAMLIDPRoleGroupMappingInfo", + "AttributeMapping", + "OIDCAttributeMapping", + "RoleMapping", + "SSOOIDCSettings", + "SSOSAMLSettings", + "SSOSAMLSettingsByMetadata", + "UserObj", + "UserPassword", + "UserPasswordBcrypt", + "UserPasswordDjango", + "UserPasswordFirebase", + "UserPasswordPbkdf2", +] diff --git a/descope/auth.py b/descope/auth.py index 4fd2c9479..b407b388e 100644 --- a/descope/auth.py +++ b/descope/auth.py @@ -16,7 +16,7 @@ except ImportError: from pkg_resources import get_distribution -import requests +import httpx from email_validator import EmailNotValidError, validate_email from jwt import ExpiredSignatureError, ImmatureSignatureError @@ -138,14 +138,14 @@ def do_get( self, uri: str, params=None, - allow_redirects=None, + follow_redirects=None, pswd: str | None = None, - ) -> requests.Response: - response = requests.get( + ) -> httpx.Response: + response = httpx.get( f"{self.base_url}{uri}", headers=self._get_default_headers(pswd), params=params, - allow_redirects=allow_redirects, + follow_redirects=follow_redirects, verify=self.secure, timeout=self.timeout_seconds, ) @@ -158,12 +158,12 @@ def do_post( body: dict | list[dict] | list[str] | None, params=None, pswd: str | None = None, - ) -> requests.Response: - response = requests.post( + ) -> httpx.Response: + response = httpx.post( f"{self.base_url}{uri}", headers=self._get_default_headers(pswd), json=body, - allow_redirects=False, + follow_redirects=False, verify=self.secure, params=params, timeout=self.timeout_seconds, @@ -177,12 +177,12 @@ def do_patch( body: dict | list[dict] | list[str] | None, params=None, pswd: str | None = None, - ) -> requests.Response: - response = requests.patch( + ) -> httpx.Response: + response = httpx.patch( f"{self.base_url}{uri}", headers=self._get_default_headers(pswd), json=body, - allow_redirects=False, + follow_redirects=False, verify=self.secure, params=params, timeout=self.timeout_seconds, @@ -192,12 +192,12 @@ def do_patch( def do_delete( self, uri: str, params=None, pswd: str | None = None - ) -> requests.Response: - response = requests.delete( + ) -> httpx.Response: + response = httpx.delete( f"{self.base_url}{uri}", params=params, headers=self._get_default_headers(pswd), - allow_redirects=False, + follow_redirects=False, verify=self.secure, timeout=self.timeout_seconds, ) @@ -435,7 +435,7 @@ def _raise_from_response(self, response): def _fetch_public_keys(self) -> None: # This function called under mutex protection so no need to acquire it once again - response = requests.get( + response = httpx.get( f"{self.base_url}{EndpointsV2.public_key_path}/{self.project_id}", headers=self._get_default_headers(), verify=self.secure, diff --git a/descope/authmethod/enchantedlink.py b/descope/authmethod/enchantedlink.py index b461aa058..cab7ffc4a 100644 --- a/descope/authmethod/enchantedlink.py +++ b/descope/authmethod/enchantedlink.py @@ -1,6 +1,6 @@ from __future__ import annotations -import requests +import httpx from descope._auth_base import AuthBase from descope.auth import Auth @@ -207,5 +207,5 @@ def _compose_get_session_body(pending_ref: str) -> dict: return {"pendingRef": pending_ref} @staticmethod - def _get_pending_ref_from_response(response: requests.Response) -> dict: + def _get_pending_ref_from_response(response: httpx.Response) -> dict: return response.json() diff --git a/descope/authmethod/webauthn.py b/descope/authmethod/webauthn.py index 9f3f89b29..df72362e1 100644 --- a/descope/authmethod/webauthn.py +++ b/descope/authmethod/webauthn.py @@ -1,6 +1,6 @@ from typing import Iterable, Optional, Union -from requests import Response +from httpx import Response from descope._auth_base import AuthBase from descope.common import ( diff --git a/descope/descope_client.py b/descope/descope_client.py index ddc488782..e2f807964 100644 --- a/descope/descope_client.py +++ b/descope/descope_client.py @@ -2,7 +2,7 @@ from typing import Iterable -import requests +import httpx from descope.auth import Auth # noqa: F401 from descope.authmethod.enchantedlink import EnchantedLink # noqa: F401 @@ -362,7 +362,7 @@ def validate_and_refresh_session( session_token, refresh_token, audience ) - def logout(self, refresh_token: str) -> requests.Response: + def logout(self, refresh_token: str) -> httpx.Response: """ Logout user from current session and revoke the refresh_token. After calling this function, you must invalidate or remove any cookies you have created. @@ -370,7 +370,7 @@ def logout(self, refresh_token: str) -> requests.Response: Args: refresh_token (str): The refresh token - Return value (requests.Response): returns the response from the Descope server + Return value (httpx.Response): returns the response from the Descope server Raise: AuthException: Exception is raised if session is not authorized or another error occurs @@ -385,7 +385,7 @@ def logout(self, refresh_token: str) -> requests.Response: uri = EndpointsV1.logout_path return self._auth.do_post(uri, {}, None, refresh_token) - def logout_all(self, refresh_token: str) -> requests.Response: + def logout_all(self, refresh_token: str) -> httpx.Response: """ Logout user from all active sessions and revoke the refresh_token. After calling this function, you must invalidate or remove any cookies you have created. @@ -393,7 +393,7 @@ def logout_all(self, refresh_token: str) -> requests.Response: Args: refresh_token (str): The refresh token - Return value (requests.Response): returns the response from the Descope server + Return value (httpx.Response): returns the response from the Descope server Raise: AuthException: Exception is raised if session is not authorized or another error occurs @@ -431,7 +431,7 @@ def me(self, refresh_token: str) -> dict: uri = EndpointsV1.me_path response = self._auth.do_get( - uri=uri, params=None, allow_redirects=None, pswd=refresh_token + uri=uri, params=None, follow_redirects=None, pswd=refresh_token ) return response.json() @@ -513,7 +513,7 @@ def history(self, refresh_token: str) -> list[dict]: uri = EndpointsV1.history_path response = self._auth.do_get( - uri=uri, params=None, allow_redirects=None, pswd=refresh_token + uri=uri, params=None, follow_redirects=None, pswd=refresh_token ) return response.json() diff --git a/poetry.lock b/poetry.lock index 6f2ac996d..1243324e0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,52 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand. + +[[package]] +name = "anyio" +version = "4.5.2" +description = "High level compatibility layer for multiple asynchronous event loop implementations" +optional = false +python-versions = ">=3.8" +groups = ["main"] +markers = "python_version < \"3.9\"" +files = [ + {file = "anyio-4.5.2-py3-none-any.whl", hash = "sha256:c011ee36bc1e8ba40e5a81cb9df91925c218fe9b778554e0b56a21e1b5d4716f"}, + {file = "anyio-4.5.2.tar.gz", hash = "sha256:23009af4ed04ce05991845451e11ef02fc7c5ed29179ac9a420e5ad0ac7ddc5b"}, +] + +[package.dependencies] +exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} +idna = ">=2.8" +sniffio = ">=1.1" +typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} + +[package.extras] +doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1) ; python_version >= \"3.10\"", "uvloop (>=0.21.0b1) ; platform_python_implementation == \"CPython\" and platform_system != \"Windows\""] +trio = ["trio (>=0.26.1)"] + +[[package]] +name = "anyio" +version = "4.9.0" +description = "High level compatibility layer for multiple asynchronous event loop implementations" +optional = false +python-versions = ">=3.9" +groups = ["main"] +markers = "python_version >= \"3.9\"" +files = [ + {file = "anyio-4.9.0-py3-none-any.whl", hash = "sha256:9f76d541cad6e36af7beb62e978876f3b41e3e04f2c1fbf0884604c0a9c4d93c"}, + {file = "anyio-4.9.0.tar.gz", hash = "sha256:673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028"}, +] + +[package.dependencies] +exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} +idna = ">=2.8" +sniffio = ">=1.1" +typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} + +[package.extras] +doc = ["Sphinx (>=8.2,<9.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx_rtd_theme"] +test = ["anyio[trio]", "blockbuster (>=1.5.23)", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "trustme", "truststore (>=0.9.1) ; python_version >= \"3.10\"", "uvloop (>=0.21) ; platform_python_implementation == \"CPython\" and platform_system != \"Windows\" and python_version < \"3.14\""] +trio = ["trio (>=0.26.1)"] [[package]] name = "attrs" @@ -6,18 +54,19 @@ version = "25.3.0" description = "Classes Without Boilerplate" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "attrs-25.3.0-py3-none-any.whl", hash = "sha256:427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3"}, {file = "attrs-25.3.0.tar.gz", hash = "sha256:75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b"}, ] [package.extras] -benchmark = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins", "pytest-xdist[psutil]"] -cov = ["cloudpickle", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] -dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +benchmark = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] +cov = ["cloudpickle ; platform_python_implementation == \"CPython\"", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] +dev = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier"] -tests = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] -tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] +tests = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] +tests-mypy = ["mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\""] [[package]] name = "black" @@ -25,6 +74,8 @@ version = "24.8.0" description = "The uncompromising code formatter." optional = false python-versions = ">=3.8" +groups = ["format"] +markers = "python_version < \"3.9\"" files = [ {file = "black-24.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:09cdeb74d494ec023ded657f7092ba518e8cf78fa8386155e4a03fdcc44679e6"}, {file = "black-24.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:81c6742da39f33b08e791da38410f32e27d632260e599df7245cccee2064afeb"}, @@ -61,7 +112,7 @@ typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} [package.extras] colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)", "aiohttp (>=3.7.4,!=3.9.0)"] +d = ["aiohttp (>=3.7.4) ; sys_platform != \"win32\" or implementation_name != \"pypy\"", "aiohttp (>=3.7.4,!=3.9.0) ; sys_platform == \"win32\" and implementation_name == \"pypy\""] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] uvloop = ["uvloop (>=0.15.2)"] @@ -71,6 +122,8 @@ version = "24.10.0" description = "The uncompromising code formatter." optional = false python-versions = ">=3.9" +groups = ["format"] +markers = "python_version >= \"3.9\"" files = [ {file = "black-24.10.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e6668650ea4b685440857138e5fe40cde4d652633b1bdffc62933d0db4ed9812"}, {file = "black-24.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1c536fcf674217e87b8cc3657b81809d3c085d7bf3ef262ead700da345bfa6ea"}, @@ -117,28 +170,59 @@ version = "1.8.2" description = "Fast, simple object-to-object and broadcast signaling" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version < \"3.9\" and extra == \"flask\"" files = [ {file = "blinker-1.8.2-py3-none-any.whl", hash = "sha256:1779309f71bf239144b9399d06ae925637cf6634cf6bd131104184531bf67c01"}, {file = "blinker-1.8.2.tar.gz", hash = "sha256:8f77b09d3bf7c795e969e9486f39c2c5e9c39d4ee07424be2bc594ece9642d83"}, ] +[[package]] +name = "blinker" +version = "1.9.0" +description = "Fast, simple object-to-object and broadcast signaling" +optional = false +python-versions = ">=3.9" +groups = ["main"] +markers = "python_version >= \"3.9\" and extra == \"flask\"" +files = [ + {file = "blinker-1.9.0-py3-none-any.whl", hash = "sha256:ba0efaa9080b619ff2f3459d1d500c57bddea4a6b424b60a91141db6fd2f08bc"}, + {file = "blinker-1.9.0.tar.gz", hash = "sha256:b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf"}, +] + [[package]] name = "cachetools" version = "5.5.2" description = "Extensible memoizing collections and decorators" optional = false python-versions = ">=3.7" +groups = ["dev"] +markers = "python_version < \"3.9\"" files = [ {file = "cachetools-5.5.2-py3-none-any.whl", hash = "sha256:d26a22bcc62eb95c3beabd9f1ee5e820d3d2704fe2967cbe350e20c8ffcd3f0a"}, {file = "cachetools-5.5.2.tar.gz", hash = "sha256:1a661caa9175d26759571b2e19580f9d6393969e5dfca11fdb1f947a23e640d4"}, ] +[[package]] +name = "cachetools" +version = "6.1.0" +description = "Extensible memoizing collections and decorators" +optional = false +python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version >= \"3.9\"" +files = [ + {file = "cachetools-6.1.0-py3-none-any.whl", hash = "sha256:1c7bb3cf9193deaf3508b7c5f2a79986c13ea38965c5adcff1f84519cf39163e"}, + {file = "cachetools-6.1.0.tar.gz", hash = "sha256:b4c4f404392848db3ce7aac34950d17be4d864da4b8b66911008e430bc544587"}, +] + [[package]] name = "certifi" version = "2025.6.15" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "certifi-2025.6.15-py3-none-any.whl", hash = "sha256:2e0c7ce7cb5d8f8634ca55d2ba7e6ec2689a2fd6537d8dec1296a477a4910057"}, {file = "certifi-2025.6.15.tar.gz", hash = "sha256:d747aa5a8b9bbbb1bb8c22bb13e22bd1f18e9796defa16bab421f7f7a317323b"}, @@ -150,6 +234,8 @@ version = "1.17.1" description = "Foreign Function Interface for Python calling C code." optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "platform_python_implementation != \"PyPy\"" files = [ {file = "cffi-1.17.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14"}, {file = "cffi-1.17.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67"}, @@ -229,6 +315,7 @@ version = "3.4.0" description = "Validate configuration and produce human readable error messages." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "cfgv-3.4.0-py2.py3-none-any.whl", hash = "sha256:b7265b1f29fd3316bfcd2b330d63d024f2bfd8bcb8b0272f8e19a504856c48f9"}, {file = "cfgv-3.4.0.tar.gz", hash = "sha256:e52591d4c5f5dead8e0f673fb16db7949d2cfb3f7da4582893288f0ded8fe560"}, @@ -240,122 +327,24 @@ version = "5.2.0" description = "Universal encoding detector for Python 3" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "chardet-5.2.0-py3-none-any.whl", hash = "sha256:e1cf59446890a00105fe7b7912492ea04b6e6f06d4b742b2c788469e34c82970"}, {file = "chardet-5.2.0.tar.gz", hash = "sha256:1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7"}, ] -[[package]] -name = "charset-normalizer" -version = "3.4.2" -description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -optional = false -python-versions = ">=3.7" -files = [ - {file = "charset_normalizer-3.4.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7c48ed483eb946e6c04ccbe02c6b4d1d48e51944b6db70f697e089c193404941"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2d318c11350e10662026ad0eb71bb51c7812fc8590825304ae0bdd4ac283acd"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9cbfacf36cb0ec2897ce0ebc5d08ca44213af24265bd56eca54bee7923c48fd6"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:18dd2e350387c87dabe711b86f83c9c78af772c748904d372ade190b5c7c9d4d"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8075c35cd58273fee266c58c0c9b670947c19df5fb98e7b66710e04ad4e9ff86"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5bf4545e3b962767e5c06fe1738f951f77d27967cb2caa64c28be7c4563e162c"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:7a6ab32f7210554a96cd9e33abe3ddd86732beeafc7a28e9955cdf22ffadbab0"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:b33de11b92e9f75a2b545d6e9b6f37e398d86c3e9e9653c4864eb7e89c5773ef"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:8755483f3c00d6c9a77f490c17e6ab0c8729e39e6390328e42521ef175380ae6"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:68a328e5f55ec37c57f19ebb1fdc56a248db2e3e9ad769919a58672958e8f366"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:21b2899062867b0e1fde9b724f8aecb1af14f2778d69aacd1a5a1853a597a5db"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-win32.whl", hash = "sha256:e8082b26888e2f8b36a042a58307d5b917ef2b1cacab921ad3323ef91901c71a"}, - {file = "charset_normalizer-3.4.2-cp310-cp310-win_amd64.whl", hash = "sha256:f69a27e45c43520f5487f27627059b64aaf160415589230992cec34c5e18a509"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:be1e352acbe3c78727a16a455126d9ff83ea2dfdcbc83148d2982305a04714c2"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa88ca0b1932e93f2d961bf3addbb2db902198dca337d88c89e1559e066e7645"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d524ba3f1581b35c03cb42beebab4a13e6cdad7b36246bd22541fa585a56cccd"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28a1005facc94196e1fb3e82a3d442a9d9110b8434fc1ded7a24a2983c9888d8"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fdb20a30fe1175ecabed17cbf7812f7b804b8a315a25f24678bcdf120a90077f"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0f5d9ed7f254402c9e7d35d2f5972c9bbea9040e99cd2861bd77dc68263277c7"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:efd387a49825780ff861998cd959767800d54f8308936b21025326de4b5a42b9"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:f0aa37f3c979cf2546b73e8222bbfa3dc07a641585340179d768068e3455e544"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:e70e990b2137b29dc5564715de1e12701815dacc1d056308e2b17e9095372a82"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:0c8c57f84ccfc871a48a47321cfa49ae1df56cd1d965a09abe84066f6853b9c0"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6b66f92b17849b85cad91259efc341dce9c1af48e2173bf38a85c6329f1033e5"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-win32.whl", hash = "sha256:daac4765328a919a805fa5e2720f3e94767abd632ae410a9062dff5412bae65a"}, - {file = "charset_normalizer-3.4.2-cp311-cp311-win_amd64.whl", hash = "sha256:e53efc7c7cee4c1e70661e2e112ca46a575f90ed9ae3fef200f2a25e954f4b28"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0c29de6a1a95f24b9a1aa7aefd27d2487263f00dfd55a77719b530788f75cff7"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cddf7bd982eaa998934a91f69d182aec997c6c468898efe6679af88283b498d3"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fcbe676a55d7445b22c10967bceaaf0ee69407fbe0ece4d032b6eb8d4565982a"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d41c4d287cfc69060fa91cae9683eacffad989f1a10811995fa309df656ec214"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e594135de17ab3866138f496755f302b72157d115086d100c3f19370839dd3a"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf713fe9a71ef6fd5adf7a79670135081cd4431c2943864757f0fa3a65b1fafd"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a370b3e078e418187da8c3674eddb9d983ec09445c99a3a263c2011993522981"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a955b438e62efdf7e0b7b52a64dc5c3396e2634baa62471768a64bc2adb73d5c"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:7222ffd5e4de8e57e03ce2cef95a4c43c98fcb72ad86909abdfc2c17d227fc1b"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:bee093bf902e1d8fc0ac143c88902c3dfc8941f7ea1d6a8dd2bcb786d33db03d"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:dedb8adb91d11846ee08bec4c8236c8549ac721c245678282dcb06b221aab59f"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-win32.whl", hash = "sha256:db4c7bf0e07fc3b7d89ac2a5880a6a8062056801b83ff56d8464b70f65482b6c"}, - {file = "charset_normalizer-3.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:5a9979887252a82fefd3d3ed2a8e3b937a7a809f65dcb1e068b090e165bbe99e"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:926ca93accd5d36ccdabd803392ddc3e03e6d4cd1cf17deff3b989ab8e9dbcf0"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eba9904b0f38a143592d9fc0e19e2df0fa2e41c3c3745554761c5f6447eedabf"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3fddb7e2c84ac87ac3a947cb4e66d143ca5863ef48e4a5ecb83bd48619e4634e"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98f862da73774290f251b9df8d11161b6cf25b599a66baf087c1ffe340e9bfd1"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c9379d65defcab82d07b2a9dfbfc2e95bc8fe0ebb1b176a3190230a3ef0e07c"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e635b87f01ebc977342e2697d05b56632f5f879a4f15955dfe8cef2448b51691"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:1c95a1e2902a8b722868587c0e1184ad5c55631de5afc0eb96bc4b0d738092c0"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ef8de666d6179b009dce7bcb2ad4c4a779f113f12caf8dc77f0162c29d20490b"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:32fc0341d72e0f73f80acb0a2c94216bd704f4f0bce10aedea38f30502b271ff"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:289200a18fa698949d2b39c671c2cc7a24d44096784e76614899a7ccf2574b7b"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4a476b06fbcf359ad25d34a057b7219281286ae2477cc5ff5e3f70a246971148"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-win32.whl", hash = "sha256:aaeeb6a479c7667fbe1099af9617c83aaca22182d6cf8c53966491a0f1b7ffb7"}, - {file = "charset_normalizer-3.4.2-cp313-cp313-win_amd64.whl", hash = "sha256:aa6af9e7d59f9c12b33ae4e9450619cf2488e2bbe9b44030905877f0b2324980"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1cad5f45b3146325bb38d6855642f6fd609c3f7cad4dbaf75549bf3b904d3184"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b2680962a4848b3c4f155dc2ee64505a9c57186d0d56b43123b17ca3de18f0fa"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:36b31da18b8890a76ec181c3cf44326bf2c48e36d393ca1b72b3f484113ea344"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f4074c5a429281bf056ddd4c5d3b740ebca4d43ffffe2ef4bf4d2d05114299da"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c9e36a97bee9b86ef9a1cf7bb96747eb7a15c2f22bdb5b516434b00f2a599f02"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:1b1bde144d98e446b056ef98e59c256e9294f6b74d7af6846bf5ffdafd687a7d"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:915f3849a011c1f593ab99092f3cecfcb4d65d8feb4a64cf1bf2d22074dc0ec4"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:fb707f3e15060adf5b7ada797624a6c6e0138e2a26baa089df64c68ee98e040f"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:25a23ea5c7edc53e0f29bae2c44fcb5a1aa10591aae107f2a2b2583a9c5cbc64"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:770cab594ecf99ae64c236bc9ee3439c3f46be49796e265ce0cc8bc17b10294f"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-win32.whl", hash = "sha256:6a0289e4589e8bdfef02a80478f1dfcb14f0ab696b5a00e1f4b8a14a307a3c58"}, - {file = "charset_normalizer-3.4.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6fc1f5b51fa4cecaa18f2bd7a003f3dd039dd615cd69a2afd6d3b19aed6775f2"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:76af085e67e56c8816c3ccf256ebd136def2ed9654525348cfa744b6802b69eb"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e45ba65510e2647721e35323d6ef54c7974959f6081b58d4ef5d87c60c84919a"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:046595208aae0120559a67693ecc65dd75d46f7bf687f159127046628178dc45"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75d10d37a47afee94919c4fab4c22b9bc2a8bf7d4f46f87363bcf0573f3ff4f5"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6333b3aa5a12c26b2a4d4e7335a28f1475e0e5e17d69d55141ee3cab736f66d1"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e8323a9b031aa0393768b87f04b4164a40037fb2a3c11ac06a03ffecd3618027"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:24498ba8ed6c2e0b56d4acbf83f2d989720a93b41d712ebd4f4979660db4417b"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:844da2b5728b5ce0e32d863af26f32b5ce61bc4273a9c720a9f3aa9df73b1455"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:65c981bdbd3f57670af8b59777cbfae75364b483fa8a9f420f08094531d54a01"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:3c21d4fca343c805a52c0c78edc01e3477f6dd1ad7c47653241cf2a206d4fc58"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:dc7039885fa1baf9be153a0626e337aa7ec8bf96b0128605fb0d77788ddc1681"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-win32.whl", hash = "sha256:8272b73e1c5603666618805fe821edba66892e2870058c94c53147602eab29c7"}, - {file = "charset_normalizer-3.4.2-cp38-cp38-win_amd64.whl", hash = "sha256:70f7172939fdf8790425ba31915bfbe8335030f05b9913d7ae00a87d4395620a"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:005fa3432484527f9732ebd315da8da8001593e2cf46a3d817669f062c3d9ed4"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e92fca20c46e9f5e1bb485887d074918b13543b1c2a1185e69bb8d17ab6236a7"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:50bf98d5e563b83cc29471fa114366e6806bc06bc7a25fd59641e41445327836"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:721c76e84fe669be19c5791da68232ca2e05ba5185575086e384352e2c309597"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:82d8fd25b7f4675d0c47cf95b594d4e7b158aca33b76aa63d07186e13c0e0ab7"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3daeac64d5b371dea99714f08ffc2c208522ec6b06fbc7866a450dd446f5c0f"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:dccab8d5fa1ef9bfba0590ecf4d46df048d18ffe3eec01eeb73a42e0d9e7a8ba"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:aaf27faa992bfee0264dc1f03f4c75e9fcdda66a519db6b957a3f826e285cf12"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:eb30abc20df9ab0814b5a2524f23d75dcf83cde762c161917a2b4b7b55b1e518"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:c72fbbe68c6f32f251bdc08b8611c7b3060612236e960ef848e0a517ddbe76c5"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:982bb1e8b4ffda883b3d0a521e23abcd6fd17418f6d2c4118d257a10199c0ce3"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-win32.whl", hash = "sha256:43e0933a0eff183ee85833f341ec567c0980dae57c464d8a508e1b2ceb336471"}, - {file = "charset_normalizer-3.4.2-cp39-cp39-win_amd64.whl", hash = "sha256:d11b54acf878eef558599658b0ffca78138c8c3655cf4f3a4a673c437e67732e"}, - {file = "charset_normalizer-3.4.2-py3-none-any.whl", hash = "sha256:7f56930ab0abd1c45cd15be65cc741c28b1c9a34876ce8c17a2fa107810c0af0"}, - {file = "charset_normalizer-3.4.2.tar.gz", hash = "sha256:5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63"}, -] - [[package]] name = "click" version = "8.1.8" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" +groups = ["main", "format"] files = [ {file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"}, {file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"}, ] +markers = {main = "extra == \"flask\""} [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} @@ -366,10 +355,12 @@ version = "0.4.6" description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +groups = ["main", "dev", "format", "tests"] files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] +markers = {main = "extra == \"flask\" and platform_system == \"Windows\"", format = "platform_system == \"Windows\"", tests = "sys_platform == \"win32\""} [[package]] name = "coverage" @@ -377,6 +368,8 @@ version = "7.6.1" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.8" +groups = ["tests"] +markers = "python_version < \"3.9\"" files = [ {file = "coverage-7.6.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b06079abebbc0e89e6163b8e8f0e16270124c154dc6e4a47b413dd538859af16"}, {file = "coverage-7.6.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cf4b19715bccd7ee27b6b120e7e9dd56037b9c0681dcc1adc9ba9db3d417fa36"}, @@ -456,7 +449,91 @@ files = [ tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""} [package.extras] -toml = ["tomli"] +toml = ["tomli ; python_full_version <= \"3.11.0a6\""] + +[[package]] +name = "coverage" +version = "7.9.1" +description = "Code coverage measurement for Python" +optional = false +python-versions = ">=3.9" +groups = ["tests"] +markers = "python_version >= \"3.9\"" +files = [ + {file = "coverage-7.9.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:cc94d7c5e8423920787c33d811c0be67b7be83c705f001f7180c7b186dcf10ca"}, + {file = "coverage-7.9.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:16aa0830d0c08a2c40c264cef801db8bc4fc0e1892782e45bcacbd5889270509"}, + {file = "coverage-7.9.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cf95981b126f23db63e9dbe4cf65bd71f9a6305696fa5e2262693bc4e2183f5b"}, + {file = "coverage-7.9.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f05031cf21699785cd47cb7485f67df619e7bcdae38e0fde40d23d3d0210d3c3"}, + {file = "coverage-7.9.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb4fbcab8764dc072cb651a4bcda4d11fb5658a1d8d68842a862a6610bd8cfa3"}, + {file = "coverage-7.9.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:0f16649a7330ec307942ed27d06ee7e7a38417144620bb3d6e9a18ded8a2d3e5"}, + {file = "coverage-7.9.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:cea0a27a89e6432705fffc178064503508e3c0184b4f061700e771a09de58187"}, + {file = "coverage-7.9.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e980b53a959fa53b6f05343afbd1e6f44a23ed6c23c4b4c56c6662bbb40c82ce"}, + {file = "coverage-7.9.1-cp310-cp310-win32.whl", hash = "sha256:70760b4c5560be6ca70d11f8988ee6542b003f982b32f83d5ac0b72476607b70"}, + {file = "coverage-7.9.1-cp310-cp310-win_amd64.whl", hash = "sha256:a66e8f628b71f78c0e0342003d53b53101ba4e00ea8dabb799d9dba0abbbcebe"}, + {file = "coverage-7.9.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:95c765060e65c692da2d2f51a9499c5e9f5cf5453aeaf1420e3fc847cc060582"}, + {file = "coverage-7.9.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ba383dc6afd5ec5b7a0d0c23d38895db0e15bcba7fb0fa8901f245267ac30d86"}, + {file = "coverage-7.9.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:37ae0383f13cbdcf1e5e7014489b0d71cc0106458878ccde52e8a12ced4298ed"}, + {file = "coverage-7.9.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:69aa417a030bf11ec46149636314c24c8d60fadb12fc0ee8f10fda0d918c879d"}, + {file = "coverage-7.9.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0a4be2a28656afe279b34d4f91c3e26eccf2f85500d4a4ff0b1f8b54bf807338"}, + {file = "coverage-7.9.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:382e7ddd5289f140259b610e5f5c58f713d025cb2f66d0eb17e68d0a94278875"}, + {file = "coverage-7.9.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e5532482344186c543c37bfad0ee6069e8ae4fc38d073b8bc836fc8f03c9e250"}, + {file = "coverage-7.9.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a39d18b3f50cc121d0ce3838d32d58bd1d15dab89c910358ebefc3665712256c"}, + {file = "coverage-7.9.1-cp311-cp311-win32.whl", hash = "sha256:dd24bd8d77c98557880def750782df77ab2b6885a18483dc8588792247174b32"}, + {file = "coverage-7.9.1-cp311-cp311-win_amd64.whl", hash = "sha256:6b55ad10a35a21b8015eabddc9ba31eb590f54adc9cd39bcf09ff5349fd52125"}, + {file = "coverage-7.9.1-cp311-cp311-win_arm64.whl", hash = "sha256:6ad935f0016be24c0e97fc8c40c465f9c4b85cbbe6eac48934c0dc4d2568321e"}, + {file = "coverage-7.9.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:a8de12b4b87c20de895f10567639c0797b621b22897b0af3ce4b4e204a743626"}, + {file = "coverage-7.9.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5add197315a054e92cee1b5f686a2bcba60c4c3e66ee3de77ace6c867bdee7cb"}, + {file = "coverage-7.9.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:600a1d4106fe66f41e5d0136dfbc68fe7200a5cbe85610ddf094f8f22e1b0300"}, + {file = "coverage-7.9.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2a876e4c3e5a2a1715a6608906aa5a2e0475b9c0f68343c2ada98110512ab1d8"}, + {file = "coverage-7.9.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81f34346dd63010453922c8e628a52ea2d2ccd73cb2487f7700ac531b247c8a5"}, + {file = "coverage-7.9.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:888f8eee13f2377ce86d44f338968eedec3291876b0b8a7289247ba52cb984cd"}, + {file = "coverage-7.9.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:9969ef1e69b8c8e1e70d591f91bbc37fc9a3621e447525d1602801a24ceda898"}, + {file = "coverage-7.9.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:60c458224331ee3f1a5b472773e4a085cc27a86a0b48205409d364272d67140d"}, + {file = "coverage-7.9.1-cp312-cp312-win32.whl", hash = "sha256:5f646a99a8c2b3ff4c6a6e081f78fad0dde275cd59f8f49dc4eab2e394332e74"}, + {file = "coverage-7.9.1-cp312-cp312-win_amd64.whl", hash = "sha256:30f445f85c353090b83e552dcbbdad3ec84c7967e108c3ae54556ca69955563e"}, + {file = "coverage-7.9.1-cp312-cp312-win_arm64.whl", hash = "sha256:af41da5dca398d3474129c58cb2b106a5d93bbb196be0d307ac82311ca234342"}, + {file = "coverage-7.9.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:31324f18d5969feef7344a932c32428a2d1a3e50b15a6404e97cba1cc9b2c631"}, + {file = "coverage-7.9.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0c804506d624e8a20fb3108764c52e0eef664e29d21692afa375e0dd98dc384f"}, + {file = "coverage-7.9.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef64c27bc40189f36fcc50c3fb8f16ccda73b6a0b80d9bd6e6ce4cffcd810bbd"}, + {file = "coverage-7.9.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d4fe2348cc6ec372e25adec0219ee2334a68d2f5222e0cba9c0d613394e12d86"}, + {file = "coverage-7.9.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:34ed2186fe52fcc24d4561041979a0dec69adae7bce2ae8d1c49eace13e55c43"}, + {file = "coverage-7.9.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:25308bd3d00d5eedd5ae7d4357161f4df743e3c0240fa773ee1b0f75e6c7c0f1"}, + {file = "coverage-7.9.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:73e9439310f65d55a5a1e0564b48e34f5369bee943d72c88378f2d576f5a5751"}, + {file = "coverage-7.9.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:37ab6be0859141b53aa89412a82454b482c81cf750de4f29223d52268a86de67"}, + {file = "coverage-7.9.1-cp313-cp313-win32.whl", hash = "sha256:64bdd969456e2d02a8b08aa047a92d269c7ac1f47e0c977675d550c9a0863643"}, + {file = "coverage-7.9.1-cp313-cp313-win_amd64.whl", hash = "sha256:be9e3f68ca9edb897c2184ad0eee815c635565dbe7a0e7e814dc1f7cbab92c0a"}, + {file = "coverage-7.9.1-cp313-cp313-win_arm64.whl", hash = "sha256:1c503289ffef1d5105d91bbb4d62cbe4b14bec4d13ca225f9c73cde9bb46207d"}, + {file = "coverage-7.9.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0b3496922cb5f4215bf5caaef4cf12364a26b0be82e9ed6d050f3352cf2d7ef0"}, + {file = "coverage-7.9.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:9565c3ab1c93310569ec0d86b017f128f027cab0b622b7af288696d7ed43a16d"}, + {file = "coverage-7.9.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2241ad5dbf79ae1d9c08fe52b36d03ca122fb9ac6bca0f34439e99f8327ac89f"}, + {file = "coverage-7.9.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3bb5838701ca68b10ebc0937dbd0eb81974bac54447c55cd58dea5bca8451029"}, + {file = "coverage-7.9.1-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b30a25f814591a8c0c5372c11ac8967f669b97444c47fd794926e175c4047ece"}, + {file = "coverage-7.9.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:2d04b16a6062516df97969f1ae7efd0de9c31eb6ebdceaa0d213b21c0ca1a683"}, + {file = "coverage-7.9.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:7931b9e249edefb07cd6ae10c702788546341d5fe44db5b6108a25da4dca513f"}, + {file = "coverage-7.9.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:52e92b01041151bf607ee858e5a56c62d4b70f4dac85b8c8cb7fb8a351ab2c10"}, + {file = "coverage-7.9.1-cp313-cp313t-win32.whl", hash = "sha256:684e2110ed84fd1ca5f40e89aa44adf1729dc85444004111aa01866507adf363"}, + {file = "coverage-7.9.1-cp313-cp313t-win_amd64.whl", hash = "sha256:437c576979e4db840539674e68c84b3cda82bc824dd138d56bead1435f1cb5d7"}, + {file = "coverage-7.9.1-cp313-cp313t-win_arm64.whl", hash = "sha256:18a0912944d70aaf5f399e350445738a1a20b50fbea788f640751c2ed9208b6c"}, + {file = "coverage-7.9.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6f424507f57878e424d9a95dc4ead3fbdd72fd201e404e861e465f28ea469951"}, + {file = "coverage-7.9.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:535fde4001b2783ac80865d90e7cc7798b6b126f4cd8a8c54acfe76804e54e58"}, + {file = "coverage-7.9.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:02532fd3290bb8fa6bec876520842428e2a6ed6c27014eca81b031c2d30e3f71"}, + {file = "coverage-7.9.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:56f5eb308b17bca3bbff810f55ee26d51926d9f89ba92707ee41d3c061257e55"}, + {file = "coverage-7.9.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfa447506c1a52271f1b0de3f42ea0fa14676052549095e378d5bff1c505ff7b"}, + {file = "coverage-7.9.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:9ca8e220006966b4a7b68e8984a6aee645a0384b0769e829ba60281fe61ec4f7"}, + {file = "coverage-7.9.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:49f1d0788ba5b7ba65933f3a18864117c6506619f5ca80326b478f72acf3f385"}, + {file = "coverage-7.9.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:68cd53aec6f45b8e4724c0950ce86eacb775c6be01ce6e3669fe4f3a21e768ed"}, + {file = "coverage-7.9.1-cp39-cp39-win32.whl", hash = "sha256:95335095b6c7b1cc14c3f3f17d5452ce677e8490d101698562b2ffcacc304c8d"}, + {file = "coverage-7.9.1-cp39-cp39-win_amd64.whl", hash = "sha256:e1b5191d1648acc439b24721caab2fd0c86679d8549ed2c84d5a7ec1bedcc244"}, + {file = "coverage-7.9.1-pp39.pp310.pp311-none-any.whl", hash = "sha256:db0f04118d1db74db6c9e1cb1898532c7dcc220f1d2718f058601f7c3f499514"}, + {file = "coverage-7.9.1-py3-none-any.whl", hash = "sha256:66b974b145aa189516b6bf2d8423e888b742517d37872f6ee4c5be0073bd9a3c"}, + {file = "coverage-7.9.1.tar.gz", hash = "sha256:6cf43c78c4282708a28e466316935ec7489a9c487518a77fa68f716c67909cec"}, +] + +[package.dependencies] +tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""} + +[package.extras] +toml = ["tomli ; python_full_version <= \"3.11.0a6\""] [[package]] name = "cryptography" @@ -464,6 +541,8 @@ version = "43.0.3" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "python_version >= \"3.9\"" files = [ {file = "cryptography-43.0.3-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:bf7a1932ac4176486eab36a19ed4c0492da5d97123f1406cf15e41b05e787d2e"}, {file = "cryptography-43.0.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63efa177ff54aec6e1c0aefaa1a241232dcd37413835a9b674b6e3f0ae2bfd3e"}, @@ -507,12 +586,74 @@ ssh = ["bcrypt (>=3.1.5)"] test = ["certifi", "cryptography-vectors (==43.0.3)", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] test-randomorder = ["pytest-randomly"] +[[package]] +name = "cryptography" +version = "45.0.4" +description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." +optional = false +python-versions = "!=3.9.0,!=3.9.1,>=3.7" +groups = ["main"] +markers = "python_version < \"3.9\"" +files = [ + {file = "cryptography-45.0.4-cp311-abi3-macosx_10_9_universal2.whl", hash = "sha256:425a9a6ac2823ee6e46a76a21a4e8342d8fa5c01e08b823c1f19a8b74f096069"}, + {file = "cryptography-45.0.4-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:680806cf63baa0039b920f4976f5f31b10e772de42f16310a6839d9f21a26b0d"}, + {file = "cryptography-45.0.4-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4ca0f52170e821bc8da6fc0cc565b7bb8ff8d90d36b5e9fdd68e8a86bdf72036"}, + {file = "cryptography-45.0.4-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:f3fe7a5ae34d5a414957cc7f457e2b92076e72938423ac64d215722f6cf49a9e"}, + {file = "cryptography-45.0.4-cp311-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:25eb4d4d3e54595dc8adebc6bbd5623588991d86591a78c2548ffb64797341e2"}, + {file = "cryptography-45.0.4-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:ce1678a2ccbe696cf3af15a75bb72ee008d7ff183c9228592ede9db467e64f1b"}, + {file = "cryptography-45.0.4-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:49fe9155ab32721b9122975e168a6760d8ce4cffe423bcd7ca269ba41b5dfac1"}, + {file = "cryptography-45.0.4-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:2882338b2a6e0bd337052e8b9007ced85c637da19ef9ecaf437744495c8c2999"}, + {file = "cryptography-45.0.4-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:23b9c3ea30c3ed4db59e7b9619272e94891f8a3a5591d0b656a7582631ccf750"}, + {file = "cryptography-45.0.4-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b0a97c927497e3bc36b33987abb99bf17a9a175a19af38a892dc4bbb844d7ee2"}, + {file = "cryptography-45.0.4-cp311-abi3-win32.whl", hash = "sha256:e00a6c10a5c53979d6242f123c0a97cff9f3abed7f064fc412c36dc521b5f257"}, + {file = "cryptography-45.0.4-cp311-abi3-win_amd64.whl", hash = "sha256:817ee05c6c9f7a69a16200f0c90ab26d23a87701e2a284bd15156783e46dbcc8"}, + {file = "cryptography-45.0.4-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:964bcc28d867e0f5491a564b7debb3ffdd8717928d315d12e0d7defa9e43b723"}, + {file = "cryptography-45.0.4-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:6a5bf57554e80f75a7db3d4b1dacaa2764611ae166ab42ea9a72bcdb5d577637"}, + {file = "cryptography-45.0.4-cp37-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:46cf7088bf91bdc9b26f9c55636492c1cce3e7aaf8041bbf0243f5e5325cfb2d"}, + {file = "cryptography-45.0.4-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:7bedbe4cc930fa4b100fc845ea1ea5788fcd7ae9562e669989c11618ae8d76ee"}, + {file = "cryptography-45.0.4-cp37-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:eaa3e28ea2235b33220b949c5a0d6cf79baa80eab2eb5607ca8ab7525331b9ff"}, + {file = "cryptography-45.0.4-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:7ef2dde4fa9408475038fc9aadfc1fb2676b174e68356359632e980c661ec8f6"}, + {file = "cryptography-45.0.4-cp37-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:6a3511ae33f09094185d111160fd192c67aa0a2a8d19b54d36e4c78f651dc5ad"}, + {file = "cryptography-45.0.4-cp37-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:06509dc70dd71fa56eaa138336244e2fbaf2ac164fc9b5e66828fccfd2b680d6"}, + {file = "cryptography-45.0.4-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:5f31e6b0a5a253f6aa49be67279be4a7e5a4ef259a9f33c69f7d1b1191939872"}, + {file = "cryptography-45.0.4-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:944e9ccf67a9594137f942d5b52c8d238b1b4e46c7a0c2891b7ae6e01e7c80a4"}, + {file = "cryptography-45.0.4-cp37-abi3-win32.whl", hash = "sha256:c22fe01e53dc65edd1945a2e6f0015e887f84ced233acecb64b4daadb32f5c97"}, + {file = "cryptography-45.0.4-cp37-abi3-win_amd64.whl", hash = "sha256:627ba1bc94f6adf0b0a2e35d87020285ead22d9f648c7e75bb64f367375f3b22"}, + {file = "cryptography-45.0.4-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:a77c6fb8d76e9c9f99f2f3437c1a4ac287b34eaf40997cfab1e9bd2be175ac39"}, + {file = "cryptography-45.0.4-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:7aad98a25ed8ac917fdd8a9c1e706e5a0956e06c498be1f713b61734333a4507"}, + {file = "cryptography-45.0.4-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:3530382a43a0e524bc931f187fc69ef4c42828cf7d7f592f7f249f602b5a4ab0"}, + {file = "cryptography-45.0.4-pp310-pypy310_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:6b613164cb8425e2f8db5849ffb84892e523bf6d26deb8f9bb76ae86181fa12b"}, + {file = "cryptography-45.0.4-pp310-pypy310_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:96d4819e25bf3b685199b304a0029ce4a3caf98947ce8a066c9137cc78ad2c58"}, + {file = "cryptography-45.0.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:b97737a3ffbea79eebb062eb0d67d72307195035332501722a9ca86bab9e3ab2"}, + {file = "cryptography-45.0.4-pp311-pypy311_pp73-macosx_10_9_x86_64.whl", hash = "sha256:4828190fb6c4bcb6ebc6331f01fe66ae838bb3bd58e753b59d4b22eb444b996c"}, + {file = "cryptography-45.0.4-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:03dbff8411206713185b8cebe31bc5c0eb544799a50c09035733716b386e61a4"}, + {file = "cryptography-45.0.4-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:51dfbd4d26172d31150d84c19bbe06c68ea4b7f11bbc7b3a5e146b367c311349"}, + {file = "cryptography-45.0.4-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:0339a692de47084969500ee455e42c58e449461e0ec845a34a6a9b9bf7df7fb8"}, + {file = "cryptography-45.0.4-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:0cf13c77d710131d33e63626bd55ae7c0efb701ebdc2b3a7952b9b23a0412862"}, + {file = "cryptography-45.0.4-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:bbc505d1dc469ac12a0a064214879eac6294038d6b24ae9f71faae1448a9608d"}, + {file = "cryptography-45.0.4.tar.gz", hash = "sha256:7405ade85c83c37682c8fe65554759800a4a8c54b2d96e0f8ad114d31b808d57"}, +] + +[package.dependencies] +cffi = {version = ">=1.14", markers = "platform_python_implementation != \"PyPy\""} + +[package.extras] +docs = ["sphinx (>=5.3.0)", "sphinx-inline-tabs ; python_full_version >= \"3.8.0\"", "sphinx-rtd-theme (>=3.0.0) ; python_full_version >= \"3.8.0\""] +docstest = ["pyenchant (>=3)", "readme-renderer (>=30.0)", "sphinxcontrib-spelling (>=7.3.1)"] +nox = ["nox (>=2024.4.15)", "nox[uv] (>=2024.3.2) ; python_full_version >= \"3.8.0\""] +pep8test = ["check-sdist ; python_full_version >= \"3.8.0\"", "click (>=8.0.1)", "mypy (>=1.4)", "ruff (>=0.3.6)"] +sdist = ["build (>=1.0.0)"] +ssh = ["bcrypt (>=3.1.5)"] +test = ["certifi (>=2024)", "cryptography-vectors (==45.0.4)", "pretend (>=0.7)", "pytest (>=7.4.0)", "pytest-benchmark (>=4.0)", "pytest-cov (>=2.10.1)", "pytest-xdist (>=3.5.0)"] +test-randomorder = ["pytest-randomly"] + [[package]] name = "distlib" version = "0.3.9" description = "Distribution utilities" optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "distlib-0.3.9-py2.py3-none-any.whl", hash = "sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87"}, {file = "distlib-0.3.9.tar.gz", hash = "sha256:a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403"}, @@ -524,6 +665,8 @@ version = "2.6.1" description = "DNS toolkit" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version == \"3.8\"" files = [ {file = "dnspython-2.6.1-py3-none-any.whl", hash = "sha256:5ef3b9680161f6fa89daf8ad451b5f1a33b18ae8a1c6778cdf4b43f08c0a6e50"}, {file = "dnspython-2.6.1.tar.gz", hash = "sha256:e8f0f9c23a7b7cb99ded64e6c3a6f3e701d78f50c55e002b839dea7225cff7cc"}, @@ -538,12 +681,35 @@ idna = ["idna (>=3.6)"] trio = ["trio (>=0.23)"] wmi = ["wmi (>=1.5.1)"] +[[package]] +name = "dnspython" +version = "2.7.0" +description = "DNS toolkit" +optional = false +python-versions = ">=3.9" +groups = ["main"] +markers = "python_version >= \"3.9\"" +files = [ + {file = "dnspython-2.7.0-py3-none-any.whl", hash = "sha256:b4c34b7d10b51bcc3a5071e7b8dee77939f1e878477eeecc965e9835f63c6c86"}, + {file = "dnspython-2.7.0.tar.gz", hash = "sha256:ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1"}, +] + +[package.extras] +dev = ["black (>=23.1.0)", "coverage (>=7.0)", "flake8 (>=7)", "hypercorn (>=0.16.0)", "mypy (>=1.8)", "pylint (>=3)", "pytest (>=7.4)", "pytest-cov (>=4.1.0)", "quart-trio (>=0.11.0)", "sphinx (>=7.2.0)", "sphinx-rtd-theme (>=2.0.0)", "twine (>=4.0.0)", "wheel (>=0.42.0)"] +dnssec = ["cryptography (>=43)"] +doh = ["h2 (>=4.1.0)", "httpcore (>=1.0.0)", "httpx (>=0.26.0)"] +doq = ["aioquic (>=1.0.0)"] +idna = ["idna (>=3.7)"] +trio = ["trio (>=0.23)"] +wmi = ["wmi (>=1.5.1)"] + [[package]] name = "email-validator" version = "2.2.0" description = "A robust email address syntax and deliverability validation library." optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "email_validator-2.2.0-py3-none-any.whl", hash = "sha256:561977c2d73ce3611850a06fa56b414621e0c8faa9d66f2611407d87465da631"}, {file = "email_validator-2.2.0.tar.gz", hash = "sha256:cb690f344c617a714f22e66ae771445a1ceb46821152df8e165c5f9a364582b7"}, @@ -559,6 +725,8 @@ version = "1.3.0" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" +groups = ["main", "tests"] +markers = "python_version < \"3.11\"" files = [ {file = "exceptiongroup-1.3.0-py3-none-any.whl", hash = "sha256:4d111e6e0c13d0644cad6ddaa7ed0261a0b36971f6d23e7ec9b4b9097da78a10"}, {file = "exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88"}, @@ -576,6 +744,8 @@ version = "3.16.1" description = "A platform independent file lock." optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version < \"3.9\"" files = [ {file = "filelock-3.16.1-py3-none-any.whl", hash = "sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0"}, {file = "filelock-3.16.1.tar.gz", hash = "sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435"}, @@ -584,7 +754,25 @@ files = [ [package.extras] docs = ["furo (>=2024.8.6)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4.1)"] testing = ["covdefaults (>=2.3)", "coverage (>=7.6.1)", "diff-cover (>=9.2)", "pytest (>=8.3.3)", "pytest-asyncio (>=0.24)", "pytest-cov (>=5)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.26.4)"] -typing = ["typing-extensions (>=4.12.2)"] +typing = ["typing-extensions (>=4.12.2) ; python_version < \"3.11\""] + +[[package]] +name = "filelock" +version = "3.18.0" +description = "A platform independent file lock." +optional = false +python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version >= \"3.9\"" +files = [ + {file = "filelock-3.18.0-py3-none-any.whl", hash = "sha256:c401f4f8377c4464e6db25fff06205fd89bdd83b65eb0488ed1b160f780e21de"}, + {file = "filelock-3.18.0.tar.gz", hash = "sha256:adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2"}, +] + +[package.extras] +docs = ["furo (>=2024.8.6)", "sphinx (>=8.1.3)", "sphinx-autodoc-typehints (>=3)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.6.10)", "diff-cover (>=9.2.1)", "pytest (>=8.3.4)", "pytest-asyncio (>=0.25.2)", "pytest-cov (>=6)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.28.1)"] +typing = ["typing-extensions (>=4.12.2) ; python_version < \"3.11\""] [[package]] name = "flake8" @@ -592,6 +780,7 @@ version = "7.1.2" description = "the modular source code checker: pep8 pyflakes and co" optional = false python-versions = ">=3.8.1" +groups = ["dev"] files = [ {file = "flake8-7.1.2-py2.py3-none-any.whl", hash = "sha256:1cbc62e65536f65e6d754dfe6f1bada7f5cf392d6f5db3c2b85892466c3e7c1a"}, {file = "flake8-7.1.2.tar.gz", hash = "sha256:c586ffd0b41540951ae41af572e6790dbd49fc12b3aa2541685d253d9bd504bd"}, @@ -608,6 +797,7 @@ version = "24.12.12" description = "A plugin for flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle." optional = false python-versions = ">=3.8.1" +groups = ["dev"] files = [ {file = "flake8_bugbear-24.12.12-py3-none-any.whl", hash = "sha256:1b6967436f65ca22a42e5373aaa6f2d87966ade9aa38d4baf2a1be550767545e"}, {file = "flake8_bugbear-24.12.12.tar.gz", hash = "sha256:46273cef0a6b6ff48ca2d69e472f41420a42a46e24b2a8972e4f0d6733d12a64"}, @@ -626,6 +816,7 @@ version = "1.2.3" description = "Flake8 plug-in loading the configuration from pyproject.toml" optional = false python-versions = ">= 3.6" +groups = ["dev"] files = [ {file = "flake8_pyproject-1.2.3-py3-none-any.whl", hash = "sha256:6249fe53545205af5e76837644dc80b4c10037e73a0e5db87ff562d75fb5bd4a"}, ] @@ -643,6 +834,8 @@ version = "3.0.3" description = "A simple framework for building complex web applications." optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version < \"3.9\" and extra == \"flask\"" files = [ {file = "flask-3.0.3-py3-none-any.whl", hash = "sha256:34e815dfaa43340d1d15a5c3a02b8476004037eb4840b34910c6e21679d288f3"}, {file = "flask-3.0.3.tar.gz", hash = "sha256:ceb27b0af3823ea2737928a4d99d125a06175b8512c445cbd9a9ce200ef76842"}, @@ -660,12 +853,100 @@ Werkzeug = ">=3.0.0" async = ["asgiref (>=3.2)"] dotenv = ["python-dotenv"] +[[package]] +name = "flask" +version = "3.1.1" +description = "A simple framework for building complex web applications." +optional = false +python-versions = ">=3.9" +groups = ["main"] +markers = "python_version >= \"3.9\" and extra == \"flask\"" +files = [ + {file = "flask-3.1.1-py3-none-any.whl", hash = "sha256:07aae2bb5eaf77993ef57e357491839f5fd9f4dc281593a81a9e4d79a24f295c"}, + {file = "flask-3.1.1.tar.gz", hash = "sha256:284c7b8f2f58cb737f0cf1c30fd7eaf0ccfcde196099d24ecede3fc2005aa59e"}, +] + +[package.dependencies] +blinker = ">=1.9.0" +click = ">=8.1.3" +importlib-metadata = {version = ">=3.6.0", markers = "python_version < \"3.10\""} +itsdangerous = ">=2.2.0" +jinja2 = ">=3.1.2" +markupsafe = ">=2.1.1" +werkzeug = ">=3.1.0" + +[package.extras] +async = ["asgiref (>=3.2)"] +dotenv = ["python-dotenv"] + +[[package]] +name = "h11" +version = "0.16.0" +description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"}, + {file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"}, +] + +[[package]] +name = "httpcore" +version = "1.0.9" +description = "A minimal low-level HTTP client." +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"}, + {file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"}, +] + +[package.dependencies] +certifi = "*" +h11 = ">=0.16" + +[package.extras] +asyncio = ["anyio (>=4.0,<5.0)"] +http2 = ["h2 (>=3,<5)"] +socks = ["socksio (==1.*)"] +trio = ["trio (>=0.22.0,<1.0)"] + +[[package]] +name = "httpx" +version = "0.27.2" +description = "The next generation HTTP client." +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "httpx-0.27.2-py3-none-any.whl", hash = "sha256:7bb2708e112d8fdd7829cd4243970f0c223274051cb35ee80c03301ee29a3df0"}, + {file = "httpx-0.27.2.tar.gz", hash = "sha256:f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2"}, +] + +[package.dependencies] +anyio = "*" +certifi = "*" +httpcore = "==1.*" +idna = "*" +sniffio = "*" + +[package.extras] +brotli = ["brotli ; platform_python_implementation == \"CPython\"", "brotlicffi ; platform_python_implementation != \"CPython\""] +cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] +http2 = ["h2 (>=3,<5)"] +socks = ["socksio (==1.*)"] +zstd = ["zstandard (>=0.18.0)"] + [[package]] name = "identify" version = "2.6.1" description = "File identification library for Python" optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version < \"3.9\"" files = [ {file = "identify-2.6.1-py2.py3-none-any.whl", hash = "sha256:53863bcac7caf8d2ed85bd20312ea5dcfc22226800f6d6881f232d861db5a8f0"}, {file = "identify-2.6.1.tar.gz", hash = "sha256:91478c5fb7c3aac5ff7bf9b4344f803843dc586832d5f110d672b19aa1984c98"}, @@ -680,6 +961,8 @@ version = "2.6.12" description = "File identification library for Python" optional = false python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version >= \"3.9\"" files = [ {file = "identify-2.6.12-py2.py3-none-any.whl", hash = "sha256:ad9672d5a72e0d2ff7c5c8809b62dfa60458626352fb0eb7b55e69bdc45334a2"}, {file = "identify-2.6.12.tar.gz", hash = "sha256:d8de45749f1efb108badef65ee8386f0f7bb19a7f26185f74de6367bffbaf0e6"}, @@ -694,6 +977,7 @@ version = "3.10" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, @@ -708,6 +992,8 @@ version = "8.5.0" description = "Read metadata from Python packages" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"flask\" and python_version < \"3.9\"" files = [ {file = "importlib_metadata-8.5.0-py3-none-any.whl", hash = "sha256:45e54197d28b7a7f1559e60b95e7c567032b602131fbd588f1497f47880aa68b"}, {file = "importlib_metadata-8.5.0.tar.gz", hash = "sha256:71522656f0abace1d072b9e5481a48f07c138e00f079c38c8f883823f9c26bd7"}, @@ -717,12 +1003,37 @@ files = [ zipp = ">=3.20" [package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\""] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +enabler = ["pytest-enabler (>=2.2)"] +perf = ["ipython"] +test = ["flufl.flake8", "importlib-resources (>=1.3) ; python_version < \"3.9\"", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] +type = ["pytest-mypy"] + +[[package]] +name = "importlib-metadata" +version = "8.7.0" +description = "Read metadata from Python packages" +optional = false +python-versions = ">=3.9" +groups = ["main"] +markers = "extra == \"flask\" and python_version == \"3.9\"" +files = [ + {file = "importlib_metadata-8.7.0-py3-none-any.whl", hash = "sha256:e5dd1551894c77868a30651cef00984d50e1002d06942a7101d34870c5f02afd"}, + {file = "importlib_metadata-8.7.0.tar.gz", hash = "sha256:d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000"}, +] + +[package.dependencies] +zipp = ">=3.20" + +[package.extras] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\""] cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] enabler = ["pytest-enabler (>=2.2)"] perf = ["ipython"] -test = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] +test = ["flufl.flake8", "importlib_resources (>=1.3) ; python_version < \"3.9\"", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] type = ["pytest-mypy"] [[package]] @@ -731,6 +1042,7 @@ version = "2.1.0" description = "brain-dead simple config-ini parsing" optional = false python-versions = ">=3.8" +groups = ["tests"] files = [ {file = "iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760"}, {file = "iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7"}, @@ -742,6 +1054,7 @@ version = "5.13.2" description = "A Python utility / library to sort Python imports." optional = false python-versions = ">=3.8.0" +groups = ["dev"] files = [ {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"}, {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"}, @@ -756,6 +1069,8 @@ version = "2.2.0" description = "Safely pass data to untrusted environments and back." optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"flask\"" files = [ {file = "itsdangerous-2.2.0-py3-none-any.whl", hash = "sha256:c6242fc49e35958c8b15141343aa660db5fc54d4f13a1db01a3f5891b98700ef"}, {file = "itsdangerous-2.2.0.tar.gz", hash = "sha256:e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173"}, @@ -767,6 +1082,8 @@ version = "3.1.6" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "extra == \"flask\"" files = [ {file = "jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67"}, {file = "jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d"}, @@ -784,6 +1101,7 @@ version = "0.9.2" description = "Check python packages from requirement.txt and report issues" optional = false python-versions = ">=3.5" +groups = ["dev"] files = [ {file = "liccheck-0.9.2-py2.py3-none-any.whl", hash = "sha256:15cbedd042515945fe9d58b62e0a5af2f2a7795def216f163bb35b3016a16637"}, {file = "liccheck-0.9.2.tar.gz", hash = "sha256:bdc2190f8e95af3c8f9c19edb784ba7d41ecb2bf9189422eae6112bf84c08cd5"}, @@ -799,6 +1117,8 @@ version = "2.1.5" description = "Safely add untrusted strings to HTML/XML markup." optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "python_version < \"3.9\" and extra == \"flask\"" files = [ {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc"}, {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5"}, @@ -862,12 +1182,85 @@ files = [ {file = "MarkupSafe-2.1.5.tar.gz", hash = "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b"}, ] +[[package]] +name = "markupsafe" +version = "3.0.2" +description = "Safely add untrusted strings to HTML/XML markup." +optional = false +python-versions = ">=3.9" +groups = ["main"] +markers = "python_version >= \"3.9\" and extra == \"flask\"" +files = [ + {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:38a9ef736c01fccdd6600705b09dc574584b89bea478200c5fbf112a6b0d5579"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bbcb445fa71794da8f178f0f6d66789a28d7319071af7a496d4d507ed566270d"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:57cb5a3cf367aeb1d316576250f65edec5bb3be939e9247ae594b4bcbc317dfb"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3809ede931876f5b2ec92eef964286840ed3540dadf803dd570c3b7e13141a3b"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e07c3764494e3776c602c1e78e298937c3315ccc9043ead7e685b7f2b8d47b3c"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b424c77b206d63d500bcb69fa55ed8d0e6a3774056bdc4839fc9298a7edca171"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-win32.whl", hash = "sha256:fcabf5ff6eea076f859677f5f0b6b5c1a51e70a376b0579e0eadef8db48c6b50"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:6af100e168aa82a50e186c82875a5893c5597a0c1ccdb0d8b40240b1f28b969a"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9025b4018f3a1314059769c7bf15441064b2207cb3f065e6ea1e7359cb46db9d"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:93335ca3812df2f366e80509ae119189886b0f3c2b81325d39efdb84a1e2ae93"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2cb8438c3cbb25e220c2ab33bb226559e7afb3baec11c4f218ffa7308603c832"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a123e330ef0853c6e822384873bef7507557d8e4a082961e1defa947aa59ba84"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e084f686b92e5b83186b07e8a17fc09e38fff551f3602b249881fec658d3eca"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8213e09c917a951de9d09ecee036d5c7d36cb6cb7dbaece4c71a60d79fb9798"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:5b02fb34468b6aaa40dfc198d813a641e3a63b98c2b05a16b9f80b7ec314185e"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0bff5e0ae4ef2e1ae4fdf2dfd5b76c75e5c2fa4132d05fc1b0dabcd20c7e28c4"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-win32.whl", hash = "sha256:6c89876f41da747c8d3677a2b540fb32ef5715f97b66eeb0c6b66f5e3ef6f59d"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:70a87b411535ccad5ef2f1df5136506a10775d267e197e4cf531ced10537bd6b"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-win32.whl", hash = "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-win32.whl", hash = "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-win32.whl", hash = "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:eaa0a10b7f72326f1372a713e73c3f739b524b3af41feb43e4921cb529f5929a"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:48032821bbdf20f5799ff537c7ac3d1fba0ba032cfc06194faffa8cda8b560ff"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a9d3f5f0901fdec14d8d2f66ef7d035f2157240a433441719ac9a3fba440b13"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88b49a3b9ff31e19998750c38e030fc7bb937398b1f78cfa599aaef92d693144"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cfad01eed2c2e0c01fd0ecd2ef42c492f7f93902e39a42fc9ee1692961443a29"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:1225beacc926f536dc82e45f8a4d68502949dc67eea90eab715dea3a21c1b5f0"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:3169b1eefae027567d1ce6ee7cae382c57fe26e82775f460f0b2778beaad66c0"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:eb7972a85c54febfb25b5c4b4f3af4dcc731994c7da0d8a0b4a6eb0640e1d178"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-win32.whl", hash = "sha256:8c4e8c3ce11e1f92f6536ff07154f9d49677ebaaafc32db9db4620bc11ed480f"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:6e296a513ca3d94054c2c881cc913116e90fd030ad1c656b3869762b754f5f8a"}, + {file = "markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0"}, +] + [[package]] name = "mccabe" version = "0.7.0" description = "McCabe checker, plugin for flake8" optional = false python-versions = ">=3.6" +groups = ["dev"] files = [ {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, @@ -879,6 +1272,7 @@ version = "5.2.0" description = "Rolling backport of unittest.mock for all Pythons" optional = false python-versions = ">=3.6" +groups = ["dev"] files = [ {file = "mock-5.2.0-py3-none-any.whl", hash = "sha256:7ba87f72ca0e915175596069dbbcc7c75af7b5e9b9bc107ad6349ede0819982f"}, {file = "mock-5.2.0.tar.gz", hash = "sha256:4e460e818629b4b173f32d08bf30d3af8123afbb8e04bb5707a1fd4799e503f0"}, @@ -895,6 +1289,7 @@ version = "1.11.2" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" +groups = ["types"] files = [ {file = "mypy-1.11.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d42a6dd818ffce7be66cce644f1dff482f1d97c53ca70908dff0b9ddc120b77a"}, {file = "mypy-1.11.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:801780c56d1cdb896eacd5619a83e427ce436d86a3bdf9112527f24a66618fef"}, @@ -942,6 +1337,7 @@ version = "1.1.0" description = "Type system extensions for programs checked with the mypy type checker." optional = false python-versions = ">=3.8" +groups = ["format", "types"] files = [ {file = "mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505"}, {file = "mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558"}, @@ -953,6 +1349,7 @@ version = "1.9.1" description = "Node.js virtual environment builder" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +groups = ["dev"] files = [ {file = "nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9"}, {file = "nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f"}, @@ -964,6 +1361,7 @@ version = "25.0" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" +groups = ["dev", "format", "tests"] files = [ {file = "packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484"}, {file = "packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f"}, @@ -975,6 +1373,7 @@ version = "0.12.1" description = "Utility library for gitignore style pattern matching of file paths." optional = false python-versions = ">=3.8" +groups = ["format"] files = [ {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, @@ -986,6 +1385,7 @@ version = "0.14.1" description = "Check PEP-8 naming conventions, plugin for flake8" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pep8-naming-0.14.1.tar.gz", hash = "sha256:1ef228ae80875557eb6c1549deafed4dabbf3261cfcafa12f773fe0db9be8a36"}, {file = "pep8_naming-0.14.1-py3-none-any.whl", hash = "sha256:63f514fc777d715f935faf185dedd679ab99526a7f2f503abb61587877f7b1c5"}, @@ -1000,6 +1400,8 @@ version = "4.3.6" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false python-versions = ">=3.8" +groups = ["dev", "format"] +markers = "python_version < \"3.9\"" files = [ {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"}, {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"}, @@ -1010,12 +1412,32 @@ docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.0.2)", "sphinx-a test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.2)", "pytest-cov (>=5)", "pytest-mock (>=3.14)"] type = ["mypy (>=1.11.2)"] +[[package]] +name = "platformdirs" +version = "4.3.8" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." +optional = false +python-versions = ">=3.9" +groups = ["dev", "format"] +markers = "python_version >= \"3.9\"" +files = [ + {file = "platformdirs-4.3.8-py3-none-any.whl", hash = "sha256:ff7059bb7eb1179e2685604f4aaf157cfd9535242bd23742eadc3c13542139b4"}, + {file = "platformdirs-4.3.8.tar.gz", hash = "sha256:3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc"}, +] + +[package.extras] +docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.1.3)", "sphinx-autodoc-typehints (>=3)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.4)", "pytest-cov (>=6)", "pytest-mock (>=3.14)"] +type = ["mypy (>=1.14.1)"] + [[package]] name = "pluggy" version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" +groups = ["dev", "tests"] +markers = "python_version < \"3.9\"" files = [ {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, @@ -1025,12 +1447,31 @@ files = [ dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] +[[package]] +name = "pluggy" +version = "1.6.0" +description = "plugin and hook calling mechanisms for python" +optional = false +python-versions = ">=3.9" +groups = ["dev", "tests"] +markers = "python_version >= \"3.9\"" +files = [ + {file = "pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746"}, + {file = "pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3"}, +] + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["coverage", "pytest", "pytest-benchmark"] + [[package]] name = "pre-commit" version = "2.21.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." optional = false python-versions = ">=3.7" +groups = ["dev"] +markers = "python_version < \"3.9\"" files = [ {file = "pre_commit-2.21.0-py2.py3-none-any.whl", hash = "sha256:e2f91727039fc39a92f58a588a25b87f936de6567eed4f0e673e0507edc75bad"}, {file = "pre_commit-2.21.0.tar.gz", hash = "sha256:31ef31af7e474a8d8995027fefdfcf509b5c913ff31f2015b4ec4beb26a6f658"}, @@ -1049,6 +1490,8 @@ version = "3.6.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." optional = false python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version >= \"3.9\"" files = [ {file = "pre_commit-3.6.0-py2.py3-none-any.whl", hash = "sha256:c255039ef399049a5544b6ce13d135caba8f2c28c3b4033277a788f434308376"}, {file = "pre_commit-3.6.0.tar.gz", hash = "sha256:d30bad9abf165f7785c15a21a1f46da7d0677cb00ee7ff4c579fd38922efe15d"}, @@ -1067,6 +1510,7 @@ version = "2.12.1" description = "Python style guide checker" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pycodestyle-2.12.1-py2.py3-none-any.whl", hash = "sha256:46f0fb92069a7c28ab7bb558f05bfc0110dac69a0cd23c61ea0040283a9d78b3"}, {file = "pycodestyle-2.12.1.tar.gz", hash = "sha256:6838eae08bbce4f6accd5d5572075c63626a15ee3e6f842df996bf62f6d73521"}, @@ -1078,6 +1522,8 @@ version = "2.22" description = "C parser in Python" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "platform_python_implementation != \"PyPy\"" files = [ {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, @@ -1089,6 +1535,7 @@ version = "3.2.0" description = "passive checker of Python programs" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pyflakes-3.2.0-py2.py3-none-any.whl", hash = "sha256:84b5be138a2dfbb40689ca07e2152deb896a65c3a3e24c251c5c62489568074a"}, {file = "pyflakes-3.2.0.tar.gz", hash = "sha256:1c61603ff154621fb2a9172037d84dca3500def8c8b630657d1701f026f8af3f"}, @@ -1096,21 +1543,22 @@ files = [ [[package]] name = "pyjwt" -version = "2.9.0" +version = "2.4.0" description = "JSON Web Token implementation in Python" optional = false -python-versions = ">=3.8" +python-versions = ">=3.6" +groups = ["main"] files = [ - {file = "PyJWT-2.9.0-py3-none-any.whl", hash = "sha256:3b02fb0f44517787776cf48f2ae25d8e14f300e6d7545a4315cee571a415e850"}, - {file = "pyjwt-2.9.0.tar.gz", hash = "sha256:7e1e5b56cc735432a7369cbfa0efe50fa113ebecdc04ae6922deba8b84582d0c"}, + {file = "PyJWT-2.4.0-py3-none-any.whl", hash = "sha256:72d1d253f32dbd4f5c88eaf1fdc62f3a19f676ccbadb9dbc5d07e951b2b26daf"}, + {file = "PyJWT-2.4.0.tar.gz", hash = "sha256:d42908208c699b3b973cbeb01a969ba6a96c821eefb1c5bfe4c390c01d67abba"}, ] [package.dependencies] -cryptography = {version = ">=3.4.0", optional = true, markers = "extra == \"crypto\""} +cryptography = {version = ">=3.3.1", optional = true, markers = "extra == \"crypto\""} [package.extras] -crypto = ["cryptography (>=3.4.0)"] -dev = ["coverage[toml] (==5.0.4)", "cryptography (>=3.4.0)", "pre-commit", "pytest (>=6.0.0,<7.0.0)", "sphinx", "sphinx-rtd-theme", "zope.interface"] +crypto = ["cryptography (>=3.3.1)"] +dev = ["coverage[toml] (==5.0.4)", "cryptography (>=3.3.1)", "mypy", "pre-commit", "pytest (>=6.0.0,<7.0.0)", "sphinx", "sphinx-rtd-theme", "zope.interface"] docs = ["sphinx", "sphinx-rtd-theme", "zope.interface"] tests = ["coverage[toml] (==5.0.4)", "pytest (>=6.0.0,<7.0.0)"] @@ -1120,6 +1568,8 @@ version = "1.8.0" description = "API to interact with the python pyproject.toml based projects" optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version < \"3.9\"" files = [ {file = "pyproject_api-1.8.0-py3-none-any.whl", hash = "sha256:3d7d347a047afe796fd5d1885b1e391ba29be7169bd2f102fcd378f04273d228"}, {file = "pyproject_api-1.8.0.tar.gz", hash = "sha256:77b8049f2feb5d33eefcc21b57f1e279636277a8ac8ad6b5871037b243778496"}, @@ -1133,12 +1583,34 @@ tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} docs = ["furo (>=2024.8.6)", "sphinx-autodoc-typehints (>=2.4.1)"] testing = ["covdefaults (>=2.3)", "pytest (>=8.3.3)", "pytest-cov (>=5)", "pytest-mock (>=3.14)", "setuptools (>=75.1)"] +[[package]] +name = "pyproject-api" +version = "1.9.1" +description = "API to interact with the python pyproject.toml based projects" +optional = false +python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version >= \"3.9\"" +files = [ + {file = "pyproject_api-1.9.1-py3-none-any.whl", hash = "sha256:7d6238d92f8962773dd75b5f0c4a6a27cce092a14b623b811dba656f3b628948"}, + {file = "pyproject_api-1.9.1.tar.gz", hash = "sha256:43c9918f49daab37e302038fc1aed54a8c7a91a9fa935d00b9a485f37e0f5335"}, +] + +[package.dependencies] +packaging = ">=25" +tomli = {version = ">=2.2.1", markers = "python_version < \"3.11\""} + +[package.extras] +docs = ["furo (>=2024.8.6)", "sphinx-autodoc-typehints (>=3.2)"] +testing = ["covdefaults (>=2.3)", "pytest (>=8.3.5)", "pytest-cov (>=6.1.1)", "pytest-mock (>=3.14)", "setuptools (>=80.3.1)"] + [[package]] name = "pytest" version = "8.3.5" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" +groups = ["tests"] files = [ {file = "pytest-8.3.5-py3-none-any.whl", hash = "sha256:c69214aa47deac29fad6c2a4f590b9c4a9fdb16a403176fe154b79c0b4d4d820"}, {file = "pytest-8.3.5.tar.gz", hash = "sha256:f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845"}, @@ -1161,6 +1633,7 @@ version = "6.0.2" description = "YAML parser and emitter for Python" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, @@ -1217,48 +1690,41 @@ files = [ {file = "pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"}, ] -[[package]] -name = "requests" -version = "2.32.4" -description = "Python HTTP for Humans." -optional = false -python-versions = ">=3.8" -files = [ - {file = "requests-2.32.4-py3-none-any.whl", hash = "sha256:27babd3cda2a6d50b30443204ee89830707d396671944c998b5975b031ac2b2c"}, - {file = "requests-2.32.4.tar.gz", hash = "sha256:27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422"}, -] - -[package.dependencies] -certifi = ">=2017.4.17" -charset_normalizer = ">=2,<4" -idna = ">=2.5,<4" -urllib3 = ">=1.21.1,<3" - -[package.extras] -socks = ["PySocks (>=1.5.6,!=1.5.7)"] -use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] - [[package]] name = "semantic-version" version = "2.10.0" description = "A library implementing the 'SemVer' scheme." optional = false python-versions = ">=2.7" +groups = ["dev"] files = [ {file = "semantic_version-2.10.0-py2.py3-none-any.whl", hash = "sha256:de78a3b8e0feda74cabc54aab2da702113e33ac9d9eb9d2389bcf1f58b7d9177"}, {file = "semantic_version-2.10.0.tar.gz", hash = "sha256:bdabb6d336998cbb378d4b9db3a4b56a1e3235701dc05ea2690d9a997ed5041c"}, ] [package.extras] -dev = ["Django (>=1.11)", "check-manifest", "colorama (<=0.4.1)", "coverage", "flake8", "nose2", "readme-renderer (<25.0)", "tox", "wheel", "zest.releaser[recommended]"] +dev = ["Django (>=1.11)", "check-manifest", "colorama (<=0.4.1) ; python_version == \"3.4\"", "coverage", "flake8", "nose2", "readme-renderer (<25.0) ; python_version == \"3.4\"", "tox", "wheel", "zest.releaser[recommended]"] doc = ["Sphinx", "sphinx-rtd-theme"] +[[package]] +name = "sniffio" +version = "1.3.1" +description = "Sniff out which async library your code is running under" +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, + {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, +] + [[package]] name = "toml" version = "0.10.2" description = "Python Library for Tom's Obvious, Minimal Language" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +groups = ["dev"] files = [ {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, @@ -1270,6 +1736,7 @@ version = "2.2.1" description = "A lil' TOML parser" optional = false python-versions = ">=3.8" +groups = ["dev", "format", "tests", "types"] files = [ {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"}, @@ -1304,6 +1771,7 @@ files = [ {file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"}, {file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"}, ] +markers = {dev = "python_version < \"3.11\"", format = "python_version < \"3.11\"", tests = "python_full_version <= \"3.11.0a6\"", types = "python_version < \"3.11\""} [[package]] name = "tox" @@ -1311,6 +1779,7 @@ version = "4.25.0" description = "tox is a generic virtualenv management and test command line tool" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "tox-4.25.0-py3-none-any.whl", hash = "sha256:4dfdc7ba2cc6fdc6688dde1b21e7b46ff6c41795fb54586c91a3533317b5255c"}, {file = "tox-4.25.0.tar.gz", hash = "sha256:dd67f030317b80722cf52b246ff42aafd3ed27ddf331c415612d084304cf5e52"}, @@ -1332,26 +1801,13 @@ virtualenv = ">=20.29.1" [package.extras] test = ["devpi-process (>=1.0.2)", "pytest (>=8.3.4)", "pytest-mock (>=3.14)"] -[[package]] -name = "types-requests" -version = "2.32.0.20240914" -description = "Typing stubs for requests" -optional = false -python-versions = ">=3.8" -files = [ - {file = "types-requests-2.32.0.20240914.tar.gz", hash = "sha256:2850e178db3919d9bf809e434eef65ba49d0e7e33ac92d588f4a5e295fffd405"}, - {file = "types_requests-2.32.0.20240914-py3-none-any.whl", hash = "sha256:59c2f673eb55f32a99b2894faf6020e1a9f4a402ad0f192bfee0b64469054310"}, -] - -[package.dependencies] -urllib3 = ">=2" - [[package]] name = "types-setuptools" version = "75.1.0.20240917" description = "Typing stubs for setuptools" optional = false python-versions = ">=3.8" +groups = ["types"] files = [ {file = "types-setuptools-75.1.0.20240917.tar.gz", hash = "sha256:12f12a165e7ed383f31def705e5c0fa1c26215dd466b0af34bd042f7d5331f55"}, {file = "types_setuptools-75.1.0.20240917-py3-none-any.whl", hash = "sha256:06f78307e68d1bbde6938072c57b81cf8a99bc84bd6dc7e4c5014730b097dc0c"}, @@ -1363,27 +1819,25 @@ version = "4.13.2" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" +groups = ["main", "dev", "format", "tests", "types"] +markers = "python_version < \"3.9\"" files = [ {file = "typing_extensions-4.13.2-py3-none-any.whl", hash = "sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c"}, {file = "typing_extensions-4.13.2.tar.gz", hash = "sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef"}, ] [[package]] -name = "urllib3" -version = "2.2.3" -description = "HTTP library with thread-safe connection pooling, file post, and more." +name = "typing-extensions" +version = "4.14.0" +description = "Backported and Experimental Type Hints for Python 3.9+" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" +groups = ["main", "dev", "format", "tests", "types"] files = [ - {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, - {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, + {file = "typing_extensions-4.14.0-py3-none-any.whl", hash = "sha256:a1514509136dd0b477638fc68d6a91497af5076466ad0fa6c338e44e359944af"}, + {file = "typing_extensions-4.14.0.tar.gz", hash = "sha256:8676b788e32f02ab42d9e7c61324048ae4c6d844a399eebace3d4979d75ceef4"}, ] - -[package.extras] -brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] -h2 = ["h2 (>=4,<5)"] -socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] -zstd = ["zstandard (>=0.18.0)"] +markers = {main = "python_version >= \"3.9\" and python_version < \"3.13\"", dev = "python_version >= \"3.9\" and python_version < \"3.11\"", format = "python_version >= \"3.9\" and python_version < \"3.11\"", tests = "python_version >= \"3.9\" and python_version < \"3.11\"", types = "python_version >= \"3.9\""} [[package]] name = "virtualenv" @@ -1391,6 +1845,7 @@ version = "20.31.2" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "virtualenv-20.31.2-py3-none-any.whl", hash = "sha256:36efd0d9650ee985f0cad72065001e66d49a6f24eb44d98980f630686243cf11"}, {file = "virtualenv-20.31.2.tar.gz", hash = "sha256:e10c0a9d02835e592521be48b332b6caee6887f332c111aa79a09b9e79efc2af"}, @@ -1403,7 +1858,7 @@ platformdirs = ">=3.9.1,<5" [package.extras] docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.2,!=7.3)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] -test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8)", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10)"] +test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8) ; platform_python_implementation == \"PyPy\" or platform_python_implementation == \"GraalVM\" or platform_python_implementation == \"CPython\" and sys_platform == \"win32\" and python_version >= \"3.13\"", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10) ; platform_python_implementation == \"CPython\""] [[package]] name = "werkzeug" @@ -1411,6 +1866,8 @@ version = "3.0.6" description = "The comprehensive WSGI web application library." optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version < \"3.9\" and extra == \"flask\"" files = [ {file = "werkzeug-3.0.6-py3-none-any.whl", hash = "sha256:1bc0c2310d2fbb07b1dd1105eba2f7af72f322e1e455f2f93c993bee8c8a5f17"}, {file = "werkzeug-3.0.6.tar.gz", hash = "sha256:a8dd59d4de28ca70471a34cba79bed5f7ef2e036a76b3ab0835474246eb41f8d"}, @@ -1422,29 +1879,71 @@ MarkupSafe = ">=2.1.1" [package.extras] watchdog = ["watchdog (>=2.3)"] +[[package]] +name = "werkzeug" +version = "3.1.3" +description = "The comprehensive WSGI web application library." +optional = false +python-versions = ">=3.9" +groups = ["main"] +markers = "python_version >= \"3.9\" and extra == \"flask\"" +files = [ + {file = "werkzeug-3.1.3-py3-none-any.whl", hash = "sha256:54b78bf3716d19a65be4fceccc0d1d7b89e608834989dfae50ea87564639213e"}, + {file = "werkzeug-3.1.3.tar.gz", hash = "sha256:60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746"}, +] + +[package.dependencies] +MarkupSafe = ">=2.1.1" + +[package.extras] +watchdog = ["watchdog (>=2.3)"] + [[package]] name = "zipp" version = "3.20.2" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"flask\" and python_version < \"3.9\"" files = [ {file = "zipp-3.20.2-py3-none-any.whl", hash = "sha256:a817ac80d6cf4b23bf7f2828b7cabf326f15a001bea8b1f9b49631780ba28350"}, {file = "zipp-3.20.2.tar.gz", hash = "sha256:bc9eb26f4506fda01b81bcde0ca78103b6e62f991b381fec825435c836edbc29"}, ] [package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\""] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +enabler = ["pytest-enabler (>=2.2)"] +test = ["big-O", "importlib-resources ; python_version < \"3.9\"", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] +type = ["pytest-mypy"] + +[[package]] +name = "zipp" +version = "3.23.0" +description = "Backport of pathlib-compatible object wrapper for zip files" +optional = false +python-versions = ">=3.9" +groups = ["main"] +markers = "extra == \"flask\" and python_version == \"3.9\"" +files = [ + {file = "zipp-3.23.0-py3-none-any.whl", hash = "sha256:071652d6115ed432f5ce1d34c336c0adfd6a884660d1e9712a256d3d3bd4b14e"}, + {file = "zipp-3.23.0.tar.gz", hash = "sha256:a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166"}, +] + +[package.extras] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\""] cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] enabler = ["pytest-enabler (>=2.2)"] -test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] +test = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more_itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] type = ["pytest-mypy"] [extras] flask = ["Flask"] [metadata] -lock-version = "2.0" +lock-version = "2.1" python-versions = ">=3.8.1,<4.0" -content-hash = "3ff83961673abf5e34bf736af959ea3b3e2dad184de7a3048a42a5b5c9e41580" +content-hash = "136f00d0a2be111c462cad9f44b9e4e2d39d15ac7c41c388e273199f89083884" diff --git a/pyproject.toml b/pyproject.toml index b422d1e14..f7dd694b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,18 +29,15 @@ packages = [{ include = "descope" }] [tool.poetry.extras] Flask = ["Flask"] - [tool.poetry.urls] "Bug Tracker" = "https://github.com/descope/python-sdk/issues" - [tool.poetry.dependencies] python = ">=3.8.1,<4.0" -requests = ">=2.27.0" pyjwt = { version = ">=2.4.0", extras = ["crypto"] } email-validator = [{ version = ">=2,<3", python = ">=3.8" }] -liccheck = "^0.9.1" Flask = ">=2" +httpx = "^0.27.2" [tool.poetry.group.dev.dependencies] mock = "5.2.0" @@ -64,7 +61,6 @@ black = [ [tool.poetry.group.types.dependencies] mypy = "1.11.2" -types-requests = "2.32.0.20240914" types-setuptools = "75.1.0.20240917" [tool.poetry.group.tests.dependencies] diff --git a/requirements.txt b/requirements.txt index e633b95d3..6ca078194 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,12 @@ -blinker==1.9.0; python_full_version >= "3.8.1" and python_version < "4.0" \ - --hash=sha256:b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf \ - --hash=sha256:ba0efaa9080b619ff2f3459d1d500c57bddea4a6b424b60a91141db6fd2f08bc -certifi==2025.4.26; python_full_version >= "3.8.1" and python_version < "4.0" \ - --hash=sha256:0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6 \ - --hash=sha256:30350364dfe371162649852c63336a15c70c6510c2ad5015b21c2345311805f3 +anyio==4.5.2 ; python_full_version >= "3.8.1" and python_version < "3.9" \ + --hash=sha256:23009af4ed04ce05991845451e11ef02fc7c5ed29179ac9a420e5ad0ac7ddc5b \ + --hash=sha256:c011ee36bc1e8ba40e5a81cb9df91925c218fe9b778554e0b56a21e1b5d4716f +anyio==4.9.0 ; python_version >= "3.9" and python_version < "4.0" \ + --hash=sha256:673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028 \ + --hash=sha256:9f76d541cad6e36af7beb62e978876f3b41e3e04f2c1fbf0884604c0a9c4d93c +certifi==2025.6.15 ; python_full_version >= "3.8.1" and python_version < "4.0" \ + --hash=sha256:2e0c7ce7cb5d8f8634ca55d2ba7e6ec2689a2fd6537d8dec1296a477a4910057 \ + --hash=sha256:d747aa5a8b9bbbb1bb8c22bb13e22bd1f18e9796defa16bab421f7f7a317323b cffi==1.17.1 ; python_full_version >= "3.8.1" and python_version < "4.0" and platform_python_implementation != "PyPy" \ --hash=sha256:045d61c734659cc045141be4bae381a41d89b741f795af1dd018bfb532fd0df8 \ --hash=sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2 \ @@ -72,250 +75,108 @@ cffi==1.17.1 ; python_full_version >= "3.8.1" and python_version < "4.0" and pla --hash=sha256:f79fc4fc25f1c8698ff97788206bb3c2598949bfe0fef03d299eb1b5356ada99 \ --hash=sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87 \ --hash=sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b -charset-normalizer==3.4.2; python_full_version >= "3.8.1" and python_version < "4.0" \ - --hash=sha256:005fa3432484527f9732ebd315da8da8001593e2cf46a3d817669f062c3d9ed4 \ - --hash=sha256:046595208aae0120559a67693ecc65dd75d46f7bf687f159127046628178dc45 \ - --hash=sha256:0c29de6a1a95f24b9a1aa7aefd27d2487263f00dfd55a77719b530788f75cff7 \ - --hash=sha256:0c8c57f84ccfc871a48a47321cfa49ae1df56cd1d965a09abe84066f6853b9c0 \ - --hash=sha256:0f5d9ed7f254402c9e7d35d2f5972c9bbea9040e99cd2861bd77dc68263277c7 \ - --hash=sha256:18dd2e350387c87dabe711b86f83c9c78af772c748904d372ade190b5c7c9d4d \ - --hash=sha256:1b1bde144d98e446b056ef98e59c256e9294f6b74d7af6846bf5ffdafd687a7d \ - --hash=sha256:1c95a1e2902a8b722868587c0e1184ad5c55631de5afc0eb96bc4b0d738092c0 \ - --hash=sha256:1cad5f45b3146325bb38d6855642f6fd609c3f7cad4dbaf75549bf3b904d3184 \ - --hash=sha256:21b2899062867b0e1fde9b724f8aecb1af14f2778d69aacd1a5a1853a597a5db \ - --hash=sha256:24498ba8ed6c2e0b56d4acbf83f2d989720a93b41d712ebd4f4979660db4417b \ - --hash=sha256:25a23ea5c7edc53e0f29bae2c44fcb5a1aa10591aae107f2a2b2583a9c5cbc64 \ - --hash=sha256:289200a18fa698949d2b39c671c2cc7a24d44096784e76614899a7ccf2574b7b \ - --hash=sha256:28a1005facc94196e1fb3e82a3d442a9d9110b8434fc1ded7a24a2983c9888d8 \ - --hash=sha256:32fc0341d72e0f73f80acb0a2c94216bd704f4f0bce10aedea38f30502b271ff \ - --hash=sha256:36b31da18b8890a76ec181c3cf44326bf2c48e36d393ca1b72b3f484113ea344 \ - --hash=sha256:3c21d4fca343c805a52c0c78edc01e3477f6dd1ad7c47653241cf2a206d4fc58 \ - --hash=sha256:3fddb7e2c84ac87ac3a947cb4e66d143ca5863ef48e4a5ecb83bd48619e4634e \ - --hash=sha256:43e0933a0eff183ee85833f341ec567c0980dae57c464d8a508e1b2ceb336471 \ - --hash=sha256:4a476b06fbcf359ad25d34a057b7219281286ae2477cc5ff5e3f70a246971148 \ - --hash=sha256:4e594135de17ab3866138f496755f302b72157d115086d100c3f19370839dd3a \ - --hash=sha256:50bf98d5e563b83cc29471fa114366e6806bc06bc7a25fd59641e41445327836 \ - --hash=sha256:5a9979887252a82fefd3d3ed2a8e3b937a7a809f65dcb1e068b090e165bbe99e \ - --hash=sha256:5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63 \ - --hash=sha256:5bf4545e3b962767e5c06fe1738f951f77d27967cb2caa64c28be7c4563e162c \ - --hash=sha256:6333b3aa5a12c26b2a4d4e7335a28f1475e0e5e17d69d55141ee3cab736f66d1 \ - --hash=sha256:65c981bdbd3f57670af8b59777cbfae75364b483fa8a9f420f08094531d54a01 \ - --hash=sha256:68a328e5f55ec37c57f19ebb1fdc56a248db2e3e9ad769919a58672958e8f366 \ - --hash=sha256:6a0289e4589e8bdfef02a80478f1dfcb14f0ab696b5a00e1f4b8a14a307a3c58 \ - --hash=sha256:6b66f92b17849b85cad91259efc341dce9c1af48e2173bf38a85c6329f1033e5 \ - --hash=sha256:6c9379d65defcab82d07b2a9dfbfc2e95bc8fe0ebb1b176a3190230a3ef0e07c \ - --hash=sha256:6fc1f5b51fa4cecaa18f2bd7a003f3dd039dd615cd69a2afd6d3b19aed6775f2 \ - --hash=sha256:70f7172939fdf8790425ba31915bfbe8335030f05b9913d7ae00a87d4395620a \ - --hash=sha256:721c76e84fe669be19c5791da68232ca2e05ba5185575086e384352e2c309597 \ - --hash=sha256:7222ffd5e4de8e57e03ce2cef95a4c43c98fcb72ad86909abdfc2c17d227fc1b \ - --hash=sha256:75d10d37a47afee94919c4fab4c22b9bc2a8bf7d4f46f87363bcf0573f3ff4f5 \ - --hash=sha256:76af085e67e56c8816c3ccf256ebd136def2ed9654525348cfa744b6802b69eb \ - --hash=sha256:770cab594ecf99ae64c236bc9ee3439c3f46be49796e265ce0cc8bc17b10294f \ - --hash=sha256:7a6ab32f7210554a96cd9e33abe3ddd86732beeafc7a28e9955cdf22ffadbab0 \ - --hash=sha256:7c48ed483eb946e6c04ccbe02c6b4d1d48e51944b6db70f697e089c193404941 \ - --hash=sha256:7f56930ab0abd1c45cd15be65cc741c28b1c9a34876ce8c17a2fa107810c0af0 \ - --hash=sha256:8075c35cd58273fee266c58c0c9b670947c19df5fb98e7b66710e04ad4e9ff86 \ - --hash=sha256:8272b73e1c5603666618805fe821edba66892e2870058c94c53147602eab29c7 \ - --hash=sha256:82d8fd25b7f4675d0c47cf95b594d4e7b158aca33b76aa63d07186e13c0e0ab7 \ - --hash=sha256:844da2b5728b5ce0e32d863af26f32b5ce61bc4273a9c720a9f3aa9df73b1455 \ - --hash=sha256:8755483f3c00d6c9a77f490c17e6ab0c8729e39e6390328e42521ef175380ae6 \ - --hash=sha256:915f3849a011c1f593ab99092f3cecfcb4d65d8feb4a64cf1bf2d22074dc0ec4 \ - --hash=sha256:926ca93accd5d36ccdabd803392ddc3e03e6d4cd1cf17deff3b989ab8e9dbcf0 \ - --hash=sha256:982bb1e8b4ffda883b3d0a521e23abcd6fd17418f6d2c4118d257a10199c0ce3 \ - --hash=sha256:98f862da73774290f251b9df8d11161b6cf25b599a66baf087c1ffe340e9bfd1 \ - --hash=sha256:9cbfacf36cb0ec2897ce0ebc5d08ca44213af24265bd56eca54bee7923c48fd6 \ - --hash=sha256:a370b3e078e418187da8c3674eddb9d983ec09445c99a3a263c2011993522981 \ - --hash=sha256:a955b438e62efdf7e0b7b52a64dc5c3396e2634baa62471768a64bc2adb73d5c \ - --hash=sha256:aa6af9e7d59f9c12b33ae4e9450619cf2488e2bbe9b44030905877f0b2324980 \ - --hash=sha256:aa88ca0b1932e93f2d961bf3addbb2db902198dca337d88c89e1559e066e7645 \ - --hash=sha256:aaeeb6a479c7667fbe1099af9617c83aaca22182d6cf8c53966491a0f1b7ffb7 \ - --hash=sha256:aaf27faa992bfee0264dc1f03f4c75e9fcdda66a519db6b957a3f826e285cf12 \ - --hash=sha256:b2680962a4848b3c4f155dc2ee64505a9c57186d0d56b43123b17ca3de18f0fa \ - --hash=sha256:b2d318c11350e10662026ad0eb71bb51c7812fc8590825304ae0bdd4ac283acd \ - --hash=sha256:b33de11b92e9f75a2b545d6e9b6f37e398d86c3e9e9653c4864eb7e89c5773ef \ - --hash=sha256:b3daeac64d5b371dea99714f08ffc2c208522ec6b06fbc7866a450dd446f5c0f \ - --hash=sha256:be1e352acbe3c78727a16a455126d9ff83ea2dfdcbc83148d2982305a04714c2 \ - --hash=sha256:bee093bf902e1d8fc0ac143c88902c3dfc8941f7ea1d6a8dd2bcb786d33db03d \ - --hash=sha256:c72fbbe68c6f32f251bdc08b8611c7b3060612236e960ef848e0a517ddbe76c5 \ - --hash=sha256:c9e36a97bee9b86ef9a1cf7bb96747eb7a15c2f22bdb5b516434b00f2a599f02 \ - --hash=sha256:cddf7bd982eaa998934a91f69d182aec997c6c468898efe6679af88283b498d3 \ - --hash=sha256:cf713fe9a71ef6fd5adf7a79670135081cd4431c2943864757f0fa3a65b1fafd \ - --hash=sha256:d11b54acf878eef558599658b0ffca78138c8c3655cf4f3a4a673c437e67732e \ - --hash=sha256:d41c4d287cfc69060fa91cae9683eacffad989f1a10811995fa309df656ec214 \ - --hash=sha256:d524ba3f1581b35c03cb42beebab4a13e6cdad7b36246bd22541fa585a56cccd \ - --hash=sha256:daac4765328a919a805fa5e2720f3e94767abd632ae410a9062dff5412bae65a \ - --hash=sha256:db4c7bf0e07fc3b7d89ac2a5880a6a8062056801b83ff56d8464b70f65482b6c \ - --hash=sha256:dc7039885fa1baf9be153a0626e337aa7ec8bf96b0128605fb0d77788ddc1681 \ - --hash=sha256:dccab8d5fa1ef9bfba0590ecf4d46df048d18ffe3eec01eeb73a42e0d9e7a8ba \ - --hash=sha256:dedb8adb91d11846ee08bec4c8236c8549ac721c245678282dcb06b221aab59f \ - --hash=sha256:e45ba65510e2647721e35323d6ef54c7974959f6081b58d4ef5d87c60c84919a \ - --hash=sha256:e53efc7c7cee4c1e70661e2e112ca46a575f90ed9ae3fef200f2a25e954f4b28 \ - --hash=sha256:e635b87f01ebc977342e2697d05b56632f5f879a4f15955dfe8cef2448b51691 \ - --hash=sha256:e70e990b2137b29dc5564715de1e12701815dacc1d056308e2b17e9095372a82 \ - --hash=sha256:e8082b26888e2f8b36a042a58307d5b917ef2b1cacab921ad3323ef91901c71a \ - --hash=sha256:e8323a9b031aa0393768b87f04b4164a40037fb2a3c11ac06a03ffecd3618027 \ - --hash=sha256:e92fca20c46e9f5e1bb485887d074918b13543b1c2a1185e69bb8d17ab6236a7 \ - --hash=sha256:eb30abc20df9ab0814b5a2524f23d75dcf83cde762c161917a2b4b7b55b1e518 \ - --hash=sha256:eba9904b0f38a143592d9fc0e19e2df0fa2e41c3c3745554761c5f6447eedabf \ - --hash=sha256:ef8de666d6179b009dce7bcb2ad4c4a779f113f12caf8dc77f0162c29d20490b \ - --hash=sha256:efd387a49825780ff861998cd959767800d54f8308936b21025326de4b5a42b9 \ - --hash=sha256:f0aa37f3c979cf2546b73e8222bbfa3dc07a641585340179d768068e3455e544 \ - --hash=sha256:f4074c5a429281bf056ddd4c5d3b740ebca4d43ffffe2ef4bf4d2d05114299da \ - --hash=sha256:f69a27e45c43520f5487f27627059b64aaf160415589230992cec34c5e18a509 \ - --hash=sha256:fb707f3e15060adf5b7ada797624a6c6e0138e2a26baa089df64c68ee98e040f \ - --hash=sha256:fcbe676a55d7445b22c10967bceaaf0ee69407fbe0ece4d032b6eb8d4565982a \ - --hash=sha256:fdb20a30fe1175ecabed17cbf7812f7b804b8a315a25f24678bcdf120a90077f -click==8.2.1; python_full_version >= "3.8.1" and python_version < "4.0" \ - --hash=sha256:27c491cc05d968d271d5a1db13e3b5a184636d9d930f148c50b038f0d0646202 \ - --hash=sha256:61a3265b914e850b85317d0b3109c7f8cd35a670f963866005d6ef1d5175a12b -colorama==0.4.6 ; python_full_version >= "3.8.1" and python_version < "4.0" and platform_system == "Windows" \ - --hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \ - --hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6 -cryptography==45.0.3; python_full_version >= "3.8.1" and python_version < "4.0" \ - --hash=sha256:00094838ecc7c6594171e8c8a9166124c1197b074cfca23645cee573910d76bc \ - --hash=sha256:050ce5209d5072472971e6efbfc8ec5a8f9a841de5a4db0ebd9c2e392cb81972 \ - --hash=sha256:232954730c362638544758a8160c4ee1b832dc011d2c41a306ad8f7cccc5bb0b \ - --hash=sha256:25286aacb947286620a31f78f2ed1a32cded7be5d8b729ba3fb2c988457639e4 \ - --hash=sha256:2f8f8f0b73b885ddd7f3d8c2b2234a7d3ba49002b0223f58cfde1bedd9563c56 \ - --hash=sha256:38deed72285c7ed699864f964a3f4cf11ab3fb38e8d39cfcd96710cd2b5bb716 \ - --hash=sha256:3ad69eeb92a9de9421e1f6685e85a10fbcfb75c833b42cc9bc2ba9fb00da4710 \ - --hash=sha256:5555365a50efe1f486eed6ac7062c33b97ccef409f5970a0b6f205a7cfab59c8 \ - --hash=sha256:555e5e2d3a53b4fabeca32835878b2818b3f23966a4efb0d566689777c5a12c8 \ - --hash=sha256:57a6500d459e8035e813bd8b51b671977fb149a8c95ed814989da682314d0782 \ - --hash=sha256:5833bb4355cb377ebd880457663a972cd044e7f49585aee39245c0d592904578 \ - --hash=sha256:71320fbefd05454ef2d457c481ba9a5b0e540f3753354fff6f780927c25d19b0 \ - --hash=sha256:7573d9eebaeceeb55285205dbbb8753ac1e962af3d9640791d12b36864065e71 \ - --hash=sha256:92d5f428c1a0439b2040435a1d6bc1b26ebf0af88b093c3628913dd464d13fa1 \ - --hash=sha256:97787952246a77d77934d41b62fb1b6f3581d83f71b44796a4158d93b8f5c490 \ - --hash=sha256:9bb5bf55dcb69f7067d80354d0a348368da907345a2c448b0babc4215ccd3497 \ - --hash=sha256:9cc80ce69032ffa528b5e16d217fa4d8d4bb7d6ba8659c1b4d74a1b0f4235fca \ - --hash=sha256:9e4253ed8f5948a3589b3caee7ad9a5bf218ffd16869c516535325fece163dcc \ - --hash=sha256:9eda14f049d7f09c2e8fb411dda17dd6b16a3c76a1de5e249188a32aeb92de19 \ - --hash=sha256:a2b56de3417fd5f48773ad8e91abaa700b678dc7fe1e0c757e1ae340779acf7b \ - --hash=sha256:af3f92b1dc25621f5fad065288a44ac790c5798e986a34d393ab27d2b27fcff9 \ - --hash=sha256:c5edcb90da1843df85292ef3a313513766a78fbbb83f584a5a58fb001a5a9d57 \ - --hash=sha256:c824c9281cb628015bfc3c59335163d4ca0540d49de4582d6c2637312907e4b1 \ - --hash=sha256:c92519d242703b675ccefd0f0562eb45e74d438e001f8ab52d628e885751fb06 \ - --hash=sha256:ca932e11218bcc9ef812aa497cdf669484870ecbcf2d99b765d6c27a86000942 \ - --hash=sha256:cb6ab89421bc90e0422aca911c69044c2912fc3debb19bb3c1bfe28ee3dff6ab \ - --hash=sha256:cfd84777b4b6684955ce86156cfb5e08d75e80dc2585e10d69e47f014f0a5342 \ - --hash=sha256:d377dde61c5d67eb4311eace661c3efda46c62113ff56bf05e2d679e02aebb5b \ - --hash=sha256:d54ae41e6bd70ea23707843021c778f151ca258081586f0cfa31d936ae43d1b2 \ - --hash=sha256:dc10ec1e9f21f33420cc05214989544727e776286c1c16697178978327b95c9c \ - --hash=sha256:ec21313dd335c51d7877baf2972569f40a4291b76a0ce51391523ae358d05899 \ - --hash=sha256:ec64ee375b5aaa354b2b273c921144a660a511f9df8785e6d1c942967106438e \ - --hash=sha256:ed43d396f42028c1f47b5fec012e9e12631266e3825e95c00e3cf94d472dac49 \ - --hash=sha256:edd6d51869beb7f0d472e902ef231a9b7689508e83880ea16ca3311a00bf5ce7 \ - --hash=sha256:f22af3c78abfbc7cbcdf2c55d23c3e022e1a462ee2481011d518c7fb9c9f3d65 \ - --hash=sha256:fae1e637f527750811588e4582988932c222f8251f7b7ea93739acb624e1487f \ - --hash=sha256:fed5aaca1750e46db870874c9c273cd5182a9e9deb16f06f7bdffdb5c2bde4b9 -dnspython==2.7.0; python_full_version >= "3.8.1" and python_version < "4.0" \ +cryptography==43.0.3 ; python_version >= "3.9" and python_version < "4.0" \ + --hash=sha256:0c580952eef9bf68c4747774cde7ec1d85a6e61de97281f2dba83c7d2c806362 \ + --hash=sha256:0f996e7268af62598f2fc1204afa98a3b5712313a55c4c9d434aef49cadc91d4 \ + --hash=sha256:1ec0bcf7e17c0c5669d881b1cd38c4972fade441b27bda1051665faaa89bdcaa \ + --hash=sha256:281c945d0e28c92ca5e5930664c1cefd85efe80e5c0d2bc58dd63383fda29f83 \ + --hash=sha256:2ce6fae5bdad59577b44e4dfed356944fbf1d925269114c28be377692643b4ff \ + --hash=sha256:315b9001266a492a6ff443b61238f956b214dbec9910a081ba5b6646a055a805 \ + --hash=sha256:443c4a81bb10daed9a8f334365fe52542771f25aedaf889fd323a853ce7377d6 \ + --hash=sha256:4a02ded6cd4f0a5562a8887df8b3bd14e822a90f97ac5e544c162899bc467664 \ + --hash=sha256:53a583b6637ab4c4e3591a15bc9db855b8d9dee9a669b550f311480acab6eb08 \ + --hash=sha256:63efa177ff54aec6e1c0aefaa1a241232dcd37413835a9b674b6e3f0ae2bfd3e \ + --hash=sha256:74f57f24754fe349223792466a709f8e0c093205ff0dca557af51072ff47ab18 \ + --hash=sha256:7e1ce50266f4f70bf41a2c6dc4358afadae90e2a1e5342d3c08883df1675374f \ + --hash=sha256:81ef806b1fef6b06dcebad789f988d3b37ccaee225695cf3e07648eee0fc6b73 \ + --hash=sha256:846da004a5804145a5f441b8530b4bf35afbf7da70f82409f151695b127213d5 \ + --hash=sha256:8ac43ae87929a5982f5948ceda07001ee5e83227fd69cf55b109144938d96984 \ + --hash=sha256:9762ea51a8fc2a88b70cf2995e5675b38d93bf36bd67d91721c309df184f49bd \ + --hash=sha256:a2a431ee15799d6db9fe80c82b055bae5a752bef645bba795e8e52687c69efe3 \ + --hash=sha256:bf7a1932ac4176486eab36a19ed4c0492da5d97123f1406cf15e41b05e787d2e \ + --hash=sha256:c2e6fc39c4ab499049df3bdf567f768a723a5e8464816e8f009f121a5a9f4405 \ + --hash=sha256:cbeb489927bd7af4aa98d4b261af9a5bc025bd87f0e3547e11584be9e9427be2 \ + --hash=sha256:d03b5621a135bffecad2c73e9f4deb1a0f977b9a8ffe6f8e002bf6c9d07b918c \ + --hash=sha256:d56e96520b1020449bbace2b78b603442e7e378a9b3bd68de65c782db1507995 \ + --hash=sha256:df6b6c6d742395dd77a23ea3728ab62f98379eff8fb61be2744d4679ab678f73 \ + --hash=sha256:e1be4655c7ef6e1bbe6b5d0403526601323420bcf414598955968c9ef3eb7d16 \ + --hash=sha256:f18c716be16bc1fea8e95def49edf46b82fccaa88587a45f8dc0ff6ab5d8e0a7 \ + --hash=sha256:f46304d6f0c6ab8e52770addfa2fc41e6629495548862279641972b6215451cd \ + --hash=sha256:f7b178f11ed3664fd0e995a47ed2b5ff0a12d893e41dd0494f406d1cf555cab7 +cryptography==45.0.4 ; python_full_version >= "3.8.1" and python_version < "3.9" \ + --hash=sha256:0339a692de47084969500ee455e42c58e449461e0ec845a34a6a9b9bf7df7fb8 \ + --hash=sha256:03dbff8411206713185b8cebe31bc5c0eb544799a50c09035733716b386e61a4 \ + --hash=sha256:06509dc70dd71fa56eaa138336244e2fbaf2ac164fc9b5e66828fccfd2b680d6 \ + --hash=sha256:0cf13c77d710131d33e63626bd55ae7c0efb701ebdc2b3a7952b9b23a0412862 \ + --hash=sha256:23b9c3ea30c3ed4db59e7b9619272e94891f8a3a5591d0b656a7582631ccf750 \ + --hash=sha256:25eb4d4d3e54595dc8adebc6bbd5623588991d86591a78c2548ffb64797341e2 \ + --hash=sha256:2882338b2a6e0bd337052e8b9007ced85c637da19ef9ecaf437744495c8c2999 \ + --hash=sha256:3530382a43a0e524bc931f187fc69ef4c42828cf7d7f592f7f249f602b5a4ab0 \ + --hash=sha256:425a9a6ac2823ee6e46a76a21a4e8342d8fa5c01e08b823c1f19a8b74f096069 \ + --hash=sha256:46cf7088bf91bdc9b26f9c55636492c1cce3e7aaf8041bbf0243f5e5325cfb2d \ + --hash=sha256:4828190fb6c4bcb6ebc6331f01fe66ae838bb3bd58e753b59d4b22eb444b996c \ + --hash=sha256:49fe9155ab32721b9122975e168a6760d8ce4cffe423bcd7ca269ba41b5dfac1 \ + --hash=sha256:4ca0f52170e821bc8da6fc0cc565b7bb8ff8d90d36b5e9fdd68e8a86bdf72036 \ + --hash=sha256:51dfbd4d26172d31150d84c19bbe06c68ea4b7f11bbc7b3a5e146b367c311349 \ + --hash=sha256:5f31e6b0a5a253f6aa49be67279be4a7e5a4ef259a9f33c69f7d1b1191939872 \ + --hash=sha256:627ba1bc94f6adf0b0a2e35d87020285ead22d9f648c7e75bb64f367375f3b22 \ + --hash=sha256:680806cf63baa0039b920f4976f5f31b10e772de42f16310a6839d9f21a26b0d \ + --hash=sha256:6a3511ae33f09094185d111160fd192c67aa0a2a8d19b54d36e4c78f651dc5ad \ + --hash=sha256:6a5bf57554e80f75a7db3d4b1dacaa2764611ae166ab42ea9a72bcdb5d577637 \ + --hash=sha256:6b613164cb8425e2f8db5849ffb84892e523bf6d26deb8f9bb76ae86181fa12b \ + --hash=sha256:7405ade85c83c37682c8fe65554759800a4a8c54b2d96e0f8ad114d31b808d57 \ + --hash=sha256:7aad98a25ed8ac917fdd8a9c1e706e5a0956e06c498be1f713b61734333a4507 \ + --hash=sha256:7bedbe4cc930fa4b100fc845ea1ea5788fcd7ae9562e669989c11618ae8d76ee \ + --hash=sha256:7ef2dde4fa9408475038fc9aadfc1fb2676b174e68356359632e980c661ec8f6 \ + --hash=sha256:817ee05c6c9f7a69a16200f0c90ab26d23a87701e2a284bd15156783e46dbcc8 \ + --hash=sha256:944e9ccf67a9594137f942d5b52c8d238b1b4e46c7a0c2891b7ae6e01e7c80a4 \ + --hash=sha256:964bcc28d867e0f5491a564b7debb3ffdd8717928d315d12e0d7defa9e43b723 \ + --hash=sha256:96d4819e25bf3b685199b304a0029ce4a3caf98947ce8a066c9137cc78ad2c58 \ + --hash=sha256:a77c6fb8d76e9c9f99f2f3437c1a4ac287b34eaf40997cfab1e9bd2be175ac39 \ + --hash=sha256:b0a97c927497e3bc36b33987abb99bf17a9a175a19af38a892dc4bbb844d7ee2 \ + --hash=sha256:b97737a3ffbea79eebb062eb0d67d72307195035332501722a9ca86bab9e3ab2 \ + --hash=sha256:bbc505d1dc469ac12a0a064214879eac6294038d6b24ae9f71faae1448a9608d \ + --hash=sha256:c22fe01e53dc65edd1945a2e6f0015e887f84ced233acecb64b4daadb32f5c97 \ + --hash=sha256:ce1678a2ccbe696cf3af15a75bb72ee008d7ff183c9228592ede9db467e64f1b \ + --hash=sha256:e00a6c10a5c53979d6242f123c0a97cff9f3abed7f064fc412c36dc521b5f257 \ + --hash=sha256:eaa3e28ea2235b33220b949c5a0d6cf79baa80eab2eb5607ca8ab7525331b9ff \ + --hash=sha256:f3fe7a5ae34d5a414957cc7f457e2b92076e72938423ac64d215722f6cf49a9e +dnspython==2.6.1 ; python_full_version >= "3.8.1" and python_version == "3.8" \ + --hash=sha256:5ef3b9680161f6fa89daf8ad451b5f1a33b18ae8a1c6778cdf4b43f08c0a6e50 \ + --hash=sha256:e8f0f9c23a7b7cb99ded64e6c3a6f3e701d78f50c55e002b839dea7225cff7cc +dnspython==2.7.0 ; python_version >= "3.9" and python_version < "4.0" \ --hash=sha256:b4c34b7d10b51bcc3a5071e7b8dee77939f1e878477eeecc965e9835f63c6c86 \ --hash=sha256:ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1 email-validator==2.2.0 ; python_full_version >= "3.8.1" and python_version < "4.0" \ --hash=sha256:561977c2d73ce3611850a06fa56b414621e0c8faa9d66f2611407d87465da631 \ --hash=sha256:cb690f344c617a714f22e66ae771445a1ceb46821152df8e165c5f9a364582b7 -Flask==3.1.1; python_full_version >= "3.8.1" and python_version < "4.0" \ - --hash=sha256:07aae2bb5eaf77993ef57e357491839f5fd9f4dc281593a81a9e4d79a24f295c \ - --hash=sha256:284c7b8f2f58cb737f0cf1c30fd7eaf0ccfcde196099d24ecede3fc2005aa59e +exceptiongroup==1.3.0 ; python_full_version >= "3.8.1" and python_version < "3.11" \ + --hash=sha256:4d111e6e0c13d0644cad6ddaa7ed0261a0b36971f6d23e7ec9b4b9097da78a10 \ + --hash=sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88 +h11==0.16.0 ; python_full_version >= "3.8.1" and python_version < "4.0" \ + --hash=sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1 \ + --hash=sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86 +httpcore==1.0.9 ; python_full_version >= "3.8.1" and python_version < "4.0" \ + --hash=sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55 \ + --hash=sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8 +httpx==0.27.2 ; python_full_version >= "3.8.1" and python_version < "4.0" \ + --hash=sha256:7bb2708e112d8fdd7829cd4243970f0c223274051cb35ee80c03301ee29a3df0 \ + --hash=sha256:f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2 idna==3.10 ; python_full_version >= "3.8.1" and python_version < "4.0" \ --hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \ --hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3 -importlib-metadata==8.7.0; python_full_version >= "3.8.1" and python_version < "3.10" \ - --hash=sha256:d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000 \ - --hash=sha256:e5dd1551894c77868a30651cef00984d50e1002d06942a7101d34870c5f02afd -itsdangerous==2.2.0 ; python_full_version >= "3.8.1" and python_version < "4.0" \ - --hash=sha256:c6242fc49e35958c8b15141343aa660db5fc54d4f13a1db01a3f5891b98700ef \ - --hash=sha256:e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173 -Jinja2==3.1.6; python_full_version >= "3.8.1" and python_version < "4.0" \ - --hash=sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d \ - --hash=sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67 -liccheck==0.9.2 ; python_full_version >= "3.8.1" and python_version < "4.0" \ - --hash=sha256:15cbedd042515945fe9d58b62e0a5af2f2a7795def216f163bb35b3016a16637 \ - --hash=sha256:bdc2190f8e95af3c8f9c19edb784ba7d41ecb2bf9189422eae6112bf84c08cd5 -MarkupSafe==3.0.2; python_full_version >= "3.8.1" and python_version < "4.0" \ - --hash=sha256:0bff5e0ae4ef2e1ae4fdf2dfd5b76c75e5c2fa4132d05fc1b0dabcd20c7e28c4 \ - --hash=sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30 \ - --hash=sha256:1225beacc926f536dc82e45f8a4d68502949dc67eea90eab715dea3a21c1b5f0 \ - --hash=sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9 \ - --hash=sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396 \ - --hash=sha256:1a9d3f5f0901fdec14d8d2f66ef7d035f2157240a433441719ac9a3fba440b13 \ - --hash=sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028 \ - --hash=sha256:1e084f686b92e5b83186b07e8a17fc09e38fff551f3602b249881fec658d3eca \ - --hash=sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557 \ - --hash=sha256:2cb8438c3cbb25e220c2ab33bb226559e7afb3baec11c4f218ffa7308603c832 \ - --hash=sha256:3169b1eefae027567d1ce6ee7cae382c57fe26e82775f460f0b2778beaad66c0 \ - --hash=sha256:3809ede931876f5b2ec92eef964286840ed3540dadf803dd570c3b7e13141a3b \ - --hash=sha256:38a9ef736c01fccdd6600705b09dc574584b89bea478200c5fbf112a6b0d5579 \ - --hash=sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a \ - --hash=sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c \ - --hash=sha256:48032821bbdf20f5799ff537c7ac3d1fba0ba032cfc06194faffa8cda8b560ff \ - --hash=sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c \ - --hash=sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22 \ - --hash=sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094 \ - --hash=sha256:57cb5a3cf367aeb1d316576250f65edec5bb3be939e9247ae594b4bcbc317dfb \ - --hash=sha256:5b02fb34468b6aaa40dfc198d813a641e3a63b98c2b05a16b9f80b7ec314185e \ - --hash=sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5 \ - --hash=sha256:6af100e168aa82a50e186c82875a5893c5597a0c1ccdb0d8b40240b1f28b969a \ - --hash=sha256:6c89876f41da747c8d3677a2b540fb32ef5715f97b66eeb0c6b66f5e3ef6f59d \ - --hash=sha256:6e296a513ca3d94054c2c881cc913116e90fd030ad1c656b3869762b754f5f8a \ - --hash=sha256:70a87b411535ccad5ef2f1df5136506a10775d267e197e4cf531ced10537bd6b \ - --hash=sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8 \ - --hash=sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225 \ - --hash=sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c \ - --hash=sha256:88b49a3b9ff31e19998750c38e030fc7bb937398b1f78cfa599aaef92d693144 \ - --hash=sha256:8c4e8c3ce11e1f92f6536ff07154f9d49677ebaaafc32db9db4620bc11ed480f \ - --hash=sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87 \ - --hash=sha256:9025b4018f3a1314059769c7bf15441064b2207cb3f065e6ea1e7359cb46db9d \ - --hash=sha256:93335ca3812df2f366e80509ae119189886b0f3c2b81325d39efdb84a1e2ae93 \ - --hash=sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf \ - --hash=sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158 \ - --hash=sha256:a123e330ef0853c6e822384873bef7507557d8e4a082961e1defa947aa59ba84 \ - --hash=sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb \ - --hash=sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48 \ - --hash=sha256:b424c77b206d63d500bcb69fa55ed8d0e6a3774056bdc4839fc9298a7edca171 \ - --hash=sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c \ - --hash=sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6 \ - --hash=sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd \ - --hash=sha256:bbcb445fa71794da8f178f0f6d66789a28d7319071af7a496d4d507ed566270d \ - --hash=sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1 \ - --hash=sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d \ - --hash=sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca \ - --hash=sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a \ - --hash=sha256:cfad01eed2c2e0c01fd0ecd2ef42c492f7f93902e39a42fc9ee1692961443a29 \ - --hash=sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe \ - --hash=sha256:d8213e09c917a951de9d09ecee036d5c7d36cb6cb7dbaece4c71a60d79fb9798 \ - --hash=sha256:e07c3764494e3776c602c1e78e298937c3315ccc9043ead7e685b7f2b8d47b3c \ - --hash=sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8 \ - --hash=sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f \ - --hash=sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f \ - --hash=sha256:eaa0a10b7f72326f1372a713e73c3f739b524b3af41feb43e4921cb529f5929a \ - --hash=sha256:eb7972a85c54febfb25b5c4b4f3af4dcc731994c7da0d8a0b4a6eb0640e1d178 \ - --hash=sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0 \ - --hash=sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79 \ - --hash=sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430 \ - --hash=sha256:fcabf5ff6eea076f859677f5f0b6b5c1a51e70a376b0579e0eadef8db48c6b50 pycparser==2.22 ; python_full_version >= "3.8.1" and python_version < "4.0" and platform_python_implementation != "PyPy" \ --hash=sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6 \ --hash=sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc -PyJWT[crypto]==2.10.1; python_full_version >= "3.8.1" and python_version < "4.0" \ - --hash=sha256:3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953 \ - --hash=sha256:dcdd193e30abefd5debf142f9adfcdd2b58004e644f25406ffaebd50bd98dacb -requests==2.32.4; python_full_version >= "3.8.1" and python_version < "4.0" \ - --hash=sha256:27babd3cda2a6d50b30443204ee89830707d396671944c998b5975b031ac2b2c \ - --hash=sha256:27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422 -semantic-version==2.10.0 ; python_full_version >= "3.8.1" and python_version < "4.0" \ - --hash=sha256:bdabb6d336998cbb378d4b9db3a4b56a1e3235701dc05ea2690d9a997ed5041c \ - --hash=sha256:de78a3b8e0feda74cabc54aab2da702113e33ac9d9eb9d2389bcf1f58b7d9177 -toml==0.10.2 ; python_full_version >= "3.8.1" and python_version < "4.0" \ - --hash=sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b \ - --hash=sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f -urllib3==2.5.0; python_full_version >= "3.8.1" and python_version < "4.0" \ - --hash=sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760 \ - --hash=sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc -Werkzeug==3.1.3; python_full_version >= "3.8.1" and python_version < "4.0" \ - --hash=sha256:54b78bf3716d19a65be4fceccc0d1d7b89e608834989dfae50ea87564639213e \ - --hash=sha256:60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746 -zipp==3.23.0; python_full_version >= "3.8.1" and python_version < "3.10" \ - --hash=sha256:071652d6115ed432f5ce1d34c336c0adfd6a884660d1e9712a256d3d3bd4b14e \ - --hash=sha256:a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166 +pyjwt==2.4.0 ; python_full_version >= "3.8.1" and python_version < "4.0" \ + --hash=sha256:72d1d253f32dbd4f5c88eaf1fdc62f3a19f676ccbadb9dbc5d07e951b2b26daf \ + --hash=sha256:d42908208c699b3b973cbeb01a969ba6a96c821eefb1c5bfe4c390c01d67abba +sniffio==1.3.1 ; python_full_version >= "3.8.1" and python_version < "4.0" \ + --hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 \ + --hash=sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc +typing-extensions==4.13.2 ; python_full_version >= "3.8.1" and python_version < "3.9" \ + --hash=sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c \ + --hash=sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef +typing-extensions==4.14.0 ; python_version >= "3.9" and python_version < "3.13" \ + --hash=sha256:8676b788e32f02ab42d9e7c61324048ae4c6d844a399eebace3d4979d75ceef4 \ + --hash=sha256:a1514509136dd0b477638fc68d6a91497af5076466ad0fa6c338e44e359944af diff --git a/samples/magiclink_web_sample_app.py b/samples/magiclink_web_sample_app.py index f0a57ff45..da1a7280b 100644 --- a/samples/magiclink_web_sample_app.py +++ b/samples/magiclink_web_sample_app.py @@ -1,4 +1,4 @@ -from flask import Flask, Response, _request_ctx_stack, jsonify, request +from flask import Flask, Response, g, jsonify, request from descope import ( COOKIE_DATA_NAME, @@ -116,7 +116,7 @@ def verify(): @APP.route("/api/verify_by_decorator", methods=["GET"]) @descope_verify_magiclink_token(descope_client) def verify_by_decorator(*args, **kwargs): - claims = _request_ctx_stack.top.claims + claims = g.top.claims response = f"This is a code verification API, claims are: {claims}" return jsonify(message=response) diff --git a/tests/management/test_access_key.py b/tests/management/test_access_key.py index 947a75600..a82c43a05 100644 --- a/tests/management/test_access_key.py +++ b/tests/management/test_access_key.py @@ -33,7 +33,7 @@ def test_create(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -42,7 +42,7 @@ def test_create(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -84,7 +84,7 @@ def test_create(self): "description": "this is my access key", "permittedIps": ["10.0.0.1", "192.168.1.0/24"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -98,7 +98,7 @@ def test_load(self): ) # Test failed flows - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: mock_get.return_value.ok = False self.assertRaises( AuthException, @@ -107,7 +107,7 @@ def test_load(self): ) # Test success flow - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"key": {"id": "ak1"}}""") @@ -123,7 +123,7 @@ def test_load(self): "x-descope-project-id": self.dummy_project_id, }, params={"id": "key-id"}, - allow_redirects=None, + follow_redirects=None, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -137,7 +137,7 @@ def test_search_all_users(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -146,7 +146,7 @@ def test_search_all_users(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -169,7 +169,7 @@ def test_search_all_users(self): json={ "tenantIds": ["t1, t2"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -183,7 +183,7 @@ def test_update(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -193,7 +193,7 @@ def test_update(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( client.mgmt.access_key.update( @@ -213,7 +213,7 @@ def test_update(self): "name": "new-name", "description": None, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -227,7 +227,7 @@ def test_deactivate(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -236,7 +236,7 @@ def test_deactivate(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone(client.mgmt.access_key.deactivate("ak1")) mock_post.assert_called_with( @@ -250,7 +250,7 @@ def test_deactivate(self): json={ "id": "ak1", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -264,7 +264,7 @@ def test_activate(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -273,7 +273,7 @@ def test_activate(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone(client.mgmt.access_key.activate("ak1")) mock_post.assert_called_with( @@ -287,7 +287,7 @@ def test_activate(self): json={ "id": "ak1", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -301,7 +301,7 @@ def test_delete(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -310,7 +310,7 @@ def test_delete(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone(client.mgmt.access_key.delete("ak1")) mock_post.assert_called_with( @@ -324,7 +324,7 @@ def test_delete(self): json={ "id": "ak1", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) diff --git a/tests/management/test_audit.py b/tests/management/test_audit.py index dce1e02b4..477f6caf8 100644 --- a/tests/management/test_audit.py +++ b/tests/management/test_audit.py @@ -33,7 +33,7 @@ def test_search(self): ) # Test failed search - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -42,7 +42,7 @@ def test_search(self): ) # Test success search - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = { @@ -77,7 +77,7 @@ def test_search(self): }, params=None, json={"noTenants": False}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -91,14 +91,14 @@ def test_create_event(self): ) # Test failed search - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, client.mgmt.audit.create_event, "a", "b", "c", "d" ) # Test success search - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = {} @@ -127,7 +127,7 @@ def test_create_event(self): "type": "info", "data": {"some": "data"}, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) diff --git a/tests/management/test_authz.py b/tests/management/test_authz.py index 44112b802..fcf70795c 100644 --- a/tests/management/test_authz.py +++ b/tests/management/test_authz.py @@ -31,12 +31,12 @@ def test_save_schema(self): ) # Test failed save_schema - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, client.mgmt.authz.save_schema, {}, True) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone(client.mgmt.authz.save_schema({"name": "kuku"}, True)) mock_post.assert_called_with( @@ -48,7 +48,7 @@ def test_save_schema(self): }, params=None, json={"schema": {"name": "kuku"}, "upgrade": True}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -62,12 +62,12 @@ def test_delete_schema(self): ) # Test failed delete_schema - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, client.mgmt.authz.delete_schema) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone(client.mgmt.authz.delete_schema()) mock_post.assert_called_with( @@ -79,7 +79,7 @@ def test_delete_schema(self): }, params=None, json=None, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -93,12 +93,12 @@ def test_load_schema(self): ) # Test failed load_schema - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, client.mgmt.authz.load_schema) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(client.mgmt.authz.load_schema()) mock_post.assert_called_with( @@ -110,7 +110,7 @@ def test_load_schema(self): }, params=None, json=None, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -124,12 +124,12 @@ def test_save_namespace(self): ) # Test failed save_namespace - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, client.mgmt.authz.save_namespace, {}) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( client.mgmt.authz.save_namespace({"name": "kuku"}, "old", "v1") @@ -147,7 +147,7 @@ def test_save_namespace(self): "oldName": "old", "schemaName": "v1", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -161,12 +161,12 @@ def test_delete_namespace(self): ) # Test failed delete_namespace - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, client.mgmt.authz.delete_namespace, "a") # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone(client.mgmt.authz.delete_namespace("a", "b")) mock_post.assert_called_with( @@ -178,7 +178,7 @@ def test_delete_namespace(self): }, params=None, json={"name": "a", "schemaName": "b"}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -192,14 +192,14 @@ def test_save_relation_definition(self): ) # Test failed save_relation_definition - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, client.mgmt.authz.save_relation_definition, {}, "a" ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( client.mgmt.authz.save_relation_definition( @@ -220,7 +220,7 @@ def test_save_relation_definition(self): "oldName": "old", "schemaName": "v1", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -234,14 +234,14 @@ def test_delete_relation_definition(self): ) # Test failed delete_relation_definition - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, client.mgmt.authz.delete_relation_definition, "a", "b" ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( client.mgmt.authz.delete_relation_definition("a", "b", "c") @@ -255,7 +255,7 @@ def test_delete_relation_definition(self): }, params=None, json={"name": "a", "namespace": "b", "schemaName": "c"}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -269,12 +269,12 @@ def test_create_relations(self): ) # Test failed create_relations - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, client.mgmt.authz.create_relations, []) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( client.mgmt.authz.create_relations( @@ -306,7 +306,7 @@ def test_create_relations(self): } ] }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -320,12 +320,12 @@ def test_delete_relations(self): ) # Test failed delete_relations - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, client.mgmt.authz.delete_relations, []) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( client.mgmt.authz.delete_relations( @@ -357,7 +357,7 @@ def test_delete_relations(self): } ] }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -371,14 +371,14 @@ def test_delete_relations_for_resources(self): ) # Test failed delete_relations_for_resources - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, client.mgmt.authz.delete_relations_for_resources, [] ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone(client.mgmt.authz.delete_relations_for_resources(["r"])) mock_post.assert_called_with( @@ -390,7 +390,7 @@ def test_delete_relations_for_resources(self): }, params=None, json={"resources": ["r"]}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -404,12 +404,12 @@ def test_has_relations(self): ) # Test failed has_relations - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, client.mgmt.authz.has_relations, []) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone( client.mgmt.authz.has_relations( @@ -441,7 +441,7 @@ def test_has_relations(self): } ] }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -455,14 +455,14 @@ def test_who_can_access(self): ) # Test failed who_can_access - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, client.mgmt.authz.who_can_access, "a", "b", "c" ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(client.mgmt.authz.who_can_access("a", "b", "c")) mock_post.assert_called_with( @@ -474,7 +474,7 @@ def test_who_can_access(self): }, params=None, json={"resource": "a", "relationDefinition": "b", "namespace": "c"}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -488,12 +488,12 @@ def test_resource_relations(self): ) # Test failed resource_relations - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, client.mgmt.authz.resource_relations, "a") # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(client.mgmt.authz.resource_relations("a")) mock_post.assert_called_with( @@ -505,7 +505,7 @@ def test_resource_relations(self): }, params=None, json={"resource": "a"}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -519,12 +519,12 @@ def test_targets_relations(self): ) # Test failed targets_relations - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, client.mgmt.authz.targets_relations, ["a"]) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(client.mgmt.authz.targets_relations(["a"])) mock_post.assert_called_with( @@ -536,7 +536,7 @@ def test_targets_relations(self): }, params=None, json={"targets": ["a"]}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -550,14 +550,14 @@ def test_what_can_target_access(self): ) # Test failed what_can_target_access - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, client.mgmt.authz.what_can_target_access, "a" ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(client.mgmt.authz.what_can_target_access("a")) mock_post.assert_called_with( @@ -569,7 +569,7 @@ def test_what_can_target_access(self): }, params=None, json={"target": "a"}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -583,7 +583,7 @@ def test_what_can_target_access_with_relation(self): ) # Test failed what_can_target_access_with_relation - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -594,7 +594,7 @@ def test_what_can_target_access_with_relation(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone( client.mgmt.authz.what_can_target_access_with_relation("a", "b", "c") @@ -608,7 +608,7 @@ def test_what_can_target_access_with_relation(self): }, params=None, json={"target": "a", "relationDefinition": "b", "namespace": "c"}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -622,12 +622,12 @@ def test_get_modified(self): ) # Test failed get_modified - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, client.mgmt.authz.get_modified) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(client.mgmt.authz.get_modified()) mock_post.assert_called_with( @@ -639,7 +639,7 @@ def test_get_modified(self): }, params=None, json={"since": 0}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) diff --git a/tests/management/test_fga.py b/tests/management/test_fga.py index 3a3968dfa..3c277a4c3 100644 --- a/tests/management/test_fga.py +++ b/tests/management/test_fga.py @@ -31,12 +31,12 @@ def test_save_schema(self): ) # Test failed save_schema - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, client.mgmt.fga.save_schema, "") # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone(client.mgmt.fga.save_schema("model AuthZ 1.0")) mock_post.assert_called_with( @@ -48,7 +48,7 @@ def test_save_schema(self): }, params=None, json={"dsl": "model AuthZ 1.0"}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -62,12 +62,12 @@ def test_create_relations(self): ) # Test failed create_relations - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, client.mgmt.fga.create_relations, []) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( client.mgmt.fga.create_relations( @@ -101,7 +101,7 @@ def test_create_relations(self): } ] }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -115,12 +115,12 @@ def test_delete_relations(self): ) # Test failed delete_relations - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, client.mgmt.fga.delete_relations, []) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( client.mgmt.fga.delete_relations( @@ -154,7 +154,7 @@ def test_delete_relations(self): } ] }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -168,12 +168,12 @@ def test_check(self): ) # Test failed has_relations - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, client.mgmt.fga.check, []) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone( client.mgmt.fga.check( @@ -207,7 +207,7 @@ def test_check(self): } ] }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -225,7 +225,7 @@ def test_load_resources_details_success(self): {"resourceId": "r2", "resourceType": "type2", "displayName": "Name2"}, ] } - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True mock_post.return_value.json.return_value = response_body ids = [ @@ -243,7 +243,7 @@ def test_load_resources_details_success(self): }, params=None, json={"resourceIdentifiers": ids}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -255,7 +255,7 @@ def test_load_resources_details_error(self): False, self.dummy_management_key, ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False ids = [{"resourceId": "r1", "resourceType": "type1"}] self.assertRaises( @@ -274,7 +274,7 @@ def test_save_resources_details_success(self): details = [ {"resourceId": "r1", "resourceType": "type1", "displayName": "Name1"} ] - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True client.mgmt.fga.save_resources_details(details) mock_post.assert_called_with( @@ -286,7 +286,7 @@ def test_save_resources_details_success(self): }, params=None, json={"resourcesDetails": details}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -301,7 +301,7 @@ def test_save_resources_details_error(self): details = [ {"resourceId": "r1", "resourceType": "type1", "displayName": "Name1"} ] - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, diff --git a/tests/management/test_flow.py b/tests/management/test_flow.py index 4a527a5b1..c28715c9c 100644 --- a/tests/management/test_flow.py +++ b/tests/management/test_flow.py @@ -31,7 +31,7 @@ def test_list_flows(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -39,7 +39,7 @@ def test_list_flows(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(client.mgmt.flow.list_flows()) mock_post.assert_called_with( @@ -51,7 +51,7 @@ def test_list_flows(self): }, params=None, json=None, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -65,7 +65,7 @@ def test_delete_flows(self): ) # Test failed delete flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -74,7 +74,7 @@ def test_delete_flows(self): ) # Test success delete flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(client.mgmt.flow.delete_flows(["flow-1", "flow-2"])) mock_post.assert_called_with( @@ -86,7 +86,7 @@ def test_delete_flows(self): }, params=None, json={"ids": ["flow-1", "flow-2"]}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -100,7 +100,7 @@ def test_export_flow(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -109,7 +109,7 @@ def test_export_flow(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(client.mgmt.flow.export_flow("test")) mock_post.assert_called_with( @@ -123,7 +123,7 @@ def test_export_flow(self): json={ "flowId": "test", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -137,7 +137,7 @@ def test_import_flow(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -148,7 +148,7 @@ def test_import_flow(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone( client.mgmt.flow.import_flow("name", {"name": "test"}, [{"id": "test"}]) @@ -166,7 +166,7 @@ def test_import_flow(self): "flow": {"name": "test"}, "screens": [{"id": "test"}], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -180,12 +180,12 @@ def test_export_theme(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, client.mgmt.flow.export_theme) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(client.mgmt.flow.export_theme()) mock_post.assert_called_with( @@ -197,7 +197,7 @@ def test_export_theme(self): }, params=None, json={}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -211,14 +211,14 @@ def test_import_theme(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, client.mgmt.flow.import_theme, {"id": "test"} ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(client.mgmt.flow.import_theme({"id": "test"})) mock_post.assert_called_with( @@ -230,7 +230,7 @@ def test_import_theme(self): }, params=None, json={"theme": {"id": "test"}}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) diff --git a/tests/management/test_group.py b/tests/management/test_group.py index f7d07a281..48ef0fbdc 100644 --- a/tests/management/test_group.py +++ b/tests/management/test_group.py @@ -31,7 +31,7 @@ def test_load_all_groups(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -40,7 +40,7 @@ def test_load_all_groups(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(client.mgmt.group.load_all_groups("someTenantId")) mock_post.assert_called_with( @@ -54,7 +54,7 @@ def test_load_all_groups(self): json={ "tenantId": "someTenantId", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -68,7 +68,7 @@ def test_load_all_groups_for_members(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -77,7 +77,7 @@ def test_load_all_groups_for_members(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone( client.mgmt.group.load_all_groups_for_members( @@ -97,7 +97,7 @@ def test_load_all_groups_for_members(self): "loginIds": ["three", "four"], "userIds": ["one", "two"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -111,7 +111,7 @@ def test_load_all_group_members(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -121,7 +121,7 @@ def test_load_all_group_members(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone( client.mgmt.group.load_all_group_members("someTenantId", "someGroupId") @@ -138,7 +138,7 @@ def test_load_all_group_members(self): "tenantId": "someTenantId", "groupId": "someGroupId", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) diff --git a/tests/management/test_jwt.py b/tests/management/test_jwt.py index 4deb7e837..cad166bd5 100644 --- a/tests/management/test_jwt.py +++ b/tests/management/test_jwt.py @@ -5,8 +5,7 @@ from descope import AuthException, DescopeClient from descope.common import DEFAULT_TIMEOUT_SECONDS from descope.management.common import MgmtLoginOptions, MgmtV1 - -from .. import common +from tests import common class TestUser(common.DescopeTest): @@ -33,7 +32,7 @@ def test_update_jwt(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, client.mgmt.jwt.update_jwt, "jwt", {"k1": "v1"}, 0 @@ -44,7 +43,7 @@ def test_update_jwt(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"jwt": "response"}""") @@ -64,7 +63,7 @@ def test_update_jwt(self): "customClaims": {"k1": "v1"}, "refreshDuration": 40, }, - allow_redirects=False, + follow_redirects=False, verify=True, params=None, timeout=DEFAULT_TIMEOUT_SECONDS, @@ -85,7 +84,7 @@ def test_update_jwt(self): "customClaims": {"k1": "v1"}, "refreshDuration": 0, }, - allow_redirects=False, + follow_redirects=False, verify=True, params=None, timeout=DEFAULT_TIMEOUT_SECONDS, @@ -100,7 +99,7 @@ def test_impersonate(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, client.mgmt.jwt.impersonate, "imp1", "imp2", False @@ -115,7 +114,7 @@ def test_impersonate(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"jwt": "response"}""") @@ -138,7 +137,7 @@ def test_impersonate(self): "selectedTenant": None, "refreshDuration": None, }, - allow_redirects=False, + follow_redirects=False, verify=True, params=None, timeout=DEFAULT_TIMEOUT_SECONDS, @@ -153,14 +152,16 @@ def test_stop_impersonation(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( - AuthException, client.mgmt.jwt.stop_impersonation, "", + AuthException, + client.mgmt.jwt.stop_impersonation, + "", ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"jwt": "response"}""") @@ -181,13 +182,12 @@ def test_stop_impersonation(self): "selectedTenant": None, "refreshDuration": None, }, - allow_redirects=False, + follow_redirects=False, verify=True, params=None, timeout=DEFAULT_TIMEOUT_SECONDS, ) - def test_sign_in(self): client = DescopeClient( self.dummy_project_id, @@ -207,7 +207,7 @@ def test_sign_in(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"jwt": "response"}""") @@ -230,7 +230,7 @@ def test_sign_in(self): "jwt": None, "refreshDuration": None, }, - allow_redirects=False, + follow_redirects=False, verify=True, params=None, timeout=DEFAULT_TIMEOUT_SECONDS, @@ -248,7 +248,7 @@ def test_sign_up(self): self.assertRaises(AuthException, client.mgmt.jwt.sign_up, "") # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"jwt": "response"}""") @@ -281,7 +281,7 @@ def test_sign_up(self): "customClaims": None, "refreshDuration": None, }, - allow_redirects=False, + follow_redirects=False, verify=True, params=None, timeout=DEFAULT_TIMEOUT_SECONDS, @@ -299,7 +299,7 @@ def test_sign_up_or_in(self): self.assertRaises(AuthException, client.mgmt.jwt.sign_up_or_in, "") # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"jwt": "response"}""") @@ -332,7 +332,7 @@ def test_sign_up_or_in(self): "customClaims": None, "refreshDuration": None, }, - allow_redirects=False, + follow_redirects=False, verify=True, params=None, timeout=DEFAULT_TIMEOUT_SECONDS, @@ -347,7 +347,7 @@ def test_anonymous(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"jwt": "response"}""") @@ -364,8 +364,9 @@ def test_anonymous(self): json={ "customClaims": {"k1": "v1"}, "selectedTenant": "id", - "refreshDuration": None}, - allow_redirects=False, + "refreshDuration": None, + }, + follow_redirects=False, verify=True, params=None, timeout=DEFAULT_TIMEOUT_SECONDS, diff --git a/tests/management/test_permission.py b/tests/management/test_permission.py index b6a9caca0..cd22df67f 100644 --- a/tests/management/test_permission.py +++ b/tests/management/test_permission.py @@ -33,7 +33,7 @@ def test_create(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -42,7 +42,7 @@ def test_create(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone(client.mgmt.permission.create("P1", "Something")) mock_post.assert_called_with( @@ -57,7 +57,7 @@ def test_create(self): "name": "P1", "description": "Something", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -71,7 +71,7 @@ def test_update(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -81,7 +81,7 @@ def test_update(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( client.mgmt.permission.update( @@ -103,7 +103,7 @@ def test_update(self): "newName": "new-name", "description": "new-description", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -117,7 +117,7 @@ def test_delete(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -126,7 +126,7 @@ def test_delete(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone(client.mgmt.permission.delete("name")) mock_post.assert_called_with( @@ -140,7 +140,7 @@ def test_delete(self): json={ "name": "name", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -154,12 +154,12 @@ def test_load_all(self): ) # Test failed flows - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: mock_get.return_value.ok = False self.assertRaises(AuthException, client.mgmt.permission.load_all) # Test success flow - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -179,7 +179,7 @@ def test_load_all(self): "x-descope-project-id": self.dummy_project_id, }, params=None, - allow_redirects=None, + follow_redirects=None, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) diff --git a/tests/management/test_project.py b/tests/management/test_project.py index 3217dcfec..50a03131a 100644 --- a/tests/management/test_project.py +++ b/tests/management/test_project.py @@ -33,7 +33,7 @@ def test_update_name(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -42,7 +42,7 @@ def test_update_name(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone(client.mgmt.project.update_name("new-name")) mock_post.assert_called_with( @@ -56,7 +56,7 @@ def test_update_name(self): json={ "name": "new-name", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -70,7 +70,7 @@ def test_update_tags(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -79,7 +79,7 @@ def test_update_tags(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone(client.mgmt.project.update_tags(["tag1", "tag2"])) mock_post.assert_called_with( @@ -93,7 +93,7 @@ def test_update_tags(self): json={ "tags": ["tag1", "tag2"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -107,7 +107,7 @@ def test_list_projects(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -115,7 +115,7 @@ def test_list_projects(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True json_str = """ @@ -145,7 +145,7 @@ def test_list_projects(self): }, params=None, json={}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -159,7 +159,7 @@ def test_clone(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -170,7 +170,7 @@ def test_clone(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -200,7 +200,7 @@ def test_clone(self): "environment": "production", "tags": ["apple", "banana", "cherry"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -214,7 +214,7 @@ def test_export_project(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -222,7 +222,7 @@ def test_export_project(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -245,7 +245,7 @@ def test_export_project(self): }, params=None, json={}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -259,7 +259,7 @@ def test_import_project(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -270,7 +270,7 @@ def test_import_project(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True mock_post.return_value = network_resp @@ -291,7 +291,7 @@ def test_import_project(self): "foo": "bar", }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) diff --git a/tests/management/test_role.py b/tests/management/test_role.py index 51cf4f5b4..6e0f07aaa 100644 --- a/tests/management/test_role.py +++ b/tests/management/test_role.py @@ -33,7 +33,7 @@ def test_create(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -42,7 +42,7 @@ def test_create(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone(client.mgmt.role.create("R1", "Something", ["P1"], "t1", True)) mock_post.assert_called_with( @@ -60,7 +60,7 @@ def test_create(self): "tenantId": "t1", "default": True, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -74,7 +74,7 @@ def test_update(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -84,7 +84,7 @@ def test_update(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( client.mgmt.role.update( @@ -112,7 +112,7 @@ def test_update(self): "tenantId": "t1", "default": True, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -126,7 +126,7 @@ def test_delete(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -135,7 +135,7 @@ def test_delete(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone(client.mgmt.role.delete("name")) mock_post.assert_called_with( @@ -147,7 +147,7 @@ def test_delete(self): }, params=None, json={"name": "name", "tenantId": None}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -161,12 +161,12 @@ def test_load_all(self): ) # Test failed flows - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: mock_get.return_value.ok = False self.assertRaises(AuthException, client.mgmt.role.load_all) # Test success flow - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -197,7 +197,7 @@ def test_load_all(self): "x-descope-project-id": self.dummy_project_id, }, params=None, - allow_redirects=None, + follow_redirects=None, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -211,7 +211,7 @@ def test_search(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -221,7 +221,7 @@ def test_search(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -258,7 +258,7 @@ def test_search(self): "roleNameLike": "x", "permissionNames": ["p1", "p2"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) diff --git a/tests/management/test_sso_application.py b/tests/management/test_sso_application.py index 8da82ba33..3a254d28d 100644 --- a/tests/management/test_sso_application.py +++ b/tests/management/test_sso_application.py @@ -39,7 +39,7 @@ def test_create_oidc_application(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -49,7 +49,7 @@ def test_create_oidc_application(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"id": "app1"}""") @@ -77,7 +77,7 @@ def test_create_oidc_application(self): "logo": None, "forceAuthentication": True, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -109,7 +109,7 @@ def test_create_saml_application(self): entity_id="", ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -121,7 +121,7 @@ def test_create_saml_application(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"id": "app1"}""") @@ -188,7 +188,7 @@ def test_create_saml_application(self): "forceAuthentication": True, "logoutRedirectUrl": "http://dummy.com/logout", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -202,7 +202,7 @@ def test_update_oidc_application(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -213,7 +213,7 @@ def test_update_oidc_application(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True self.assertIsNone( @@ -238,7 +238,7 @@ def test_update_oidc_application(self): "logo": None, "forceAuthentication": False, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -272,7 +272,7 @@ def test_update_saml_application(self): entity_id="", ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -285,7 +285,7 @@ def test_update_saml_application(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True self.assertIsNone( @@ -352,7 +352,7 @@ def test_update_saml_application(self): "forceAuthentication": False, "logoutRedirectUrl": None, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -366,7 +366,7 @@ def test_delete(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -375,7 +375,7 @@ def test_delete(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone(client.mgmt.sso_application.delete("app1")) mock_post.assert_called_with( @@ -389,7 +389,7 @@ def test_delete(self): json={ "id": "app1", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -403,7 +403,7 @@ def test_load(self): ) # Test failed flows - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: mock_get.return_value.ok = False self.assertRaises( AuthException, @@ -412,7 +412,7 @@ def test_load(self): ) # Test success flow - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -453,7 +453,7 @@ def test_load(self): "x-descope-project-id": self.dummy_project_id, }, params={"id": "app1"}, - allow_redirects=None, + follow_redirects=None, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -467,12 +467,12 @@ def test_load_all(self): ) # Test failed flows - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: mock_get.return_value.ok = False self.assertRaises(AuthException, client.mgmt.sso_application.load_all) # Test success flow - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -534,7 +534,7 @@ def test_load_all(self): "x-descope-project-id": self.dummy_project_id, }, params=None, - allow_redirects=None, + follow_redirects=None, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) diff --git a/tests/management/test_sso_settings.py b/tests/management/test_sso_settings.py index 482e236ba..57221726c 100644 --- a/tests/management/test_sso_settings.py +++ b/tests/management/test_sso_settings.py @@ -40,7 +40,7 @@ def test_delete_settings(self): ) # Test failed flows - with patch("requests.delete") as mock_delete: + with patch("httpx.delete") as mock_delete: mock_delete.return_value.ok = False self.assertRaises( AuthException, @@ -49,7 +49,7 @@ def test_delete_settings(self): ) # Test success flow - with patch("requests.delete") as mock_delete: + with patch("httpx.delete") as mock_delete: network_resp = mock.Mock() network_resp.ok = True @@ -64,7 +64,7 @@ def test_delete_settings(self): "Authorization": f"Bearer {self.dummy_project_id}:{self.dummy_management_key}", "x-descope-project-id": self.dummy_project_id, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -78,7 +78,7 @@ def test_load_settings(self): ) # Test failed flows - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: mock_get.return_value.ok = False self.assertRaises( AuthException, @@ -87,7 +87,7 @@ def test_load_settings(self): ) # Test success flow - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -114,7 +114,7 @@ def test_load_settings(self): "x-descope-project-id": self.dummy_project_id, }, params={"tenantId": "T2AAAA"}, - allow_redirects=None, + follow_redirects=None, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -128,7 +128,7 @@ def test_configure_oidc_settings(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -142,7 +142,7 @@ def test_configure_oidc_settings(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( client.mgmt.sso.configure_oidc_settings( @@ -214,7 +214,7 @@ def test_configure_oidc_settings(self): }, "domains": ["domain.com"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -228,7 +228,7 @@ def test_configure_saml_settings(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -247,7 +247,7 @@ def test_configure_saml_settings(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( client.mgmt.sso.configure_saml_settings( @@ -308,7 +308,7 @@ def test_configure_saml_settings(self): "redirectUrl": "https://redirect.com", "domains": ["domain.com"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -322,7 +322,7 @@ def test_configure_saml_settings_by_metadata(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -334,7 +334,7 @@ def test_configure_saml_settings_by_metadata(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( client.mgmt.sso.configure_saml_settings_by_metadata( @@ -391,7 +391,7 @@ def test_configure_saml_settings_by_metadata(self): "redirectUrl": "https://redirect.com", "domains": ["domain.com"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -409,7 +409,7 @@ def test_get_settings(self): ) # Test failed flows - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: mock_get.return_value.ok = False self.assertRaises( AuthException, @@ -418,7 +418,7 @@ def test_get_settings(self): ) # Test success flow - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -436,7 +436,7 @@ def test_get_settings(self): "x-descope-project-id": self.dummy_project_id, }, params={"tenantId": "tenant-id"}, - allow_redirects=None, + follow_redirects=None, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -450,7 +450,7 @@ def test_configure(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -464,7 +464,7 @@ def test_configure(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( client.mgmt.sso.configure( @@ -492,13 +492,13 @@ def test_configure(self): "redirectURL": "https://redirect.com", "domains": ["domain.com"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # Domain is optional - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( client.mgmt.sso.configure( @@ -525,13 +525,13 @@ def test_configure(self): "redirectURL": "https://redirect.com", "domains": None, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # Redirect is optional - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( client.mgmt.sso.configure( @@ -559,7 +559,7 @@ def test_configure(self): "redirectURL": "", "domains": ["domain.com"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -573,7 +573,7 @@ def test_configure_via_metadata(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -585,7 +585,7 @@ def test_configure_via_metadata(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( client.mgmt.sso.configure_via_metadata( @@ -609,13 +609,13 @@ def test_configure_via_metadata(self): "redirectURL": "https://redirect.com", "domains": ["domain.com"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # Test partial arguments - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( client.mgmt.sso.configure_via_metadata( @@ -637,7 +637,7 @@ def test_configure_via_metadata(self): "redirectURL": None, "domains": None, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -651,7 +651,7 @@ def test_mapping(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -662,7 +662,7 @@ def test_mapping(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( client.mgmt.sso.mapping( @@ -694,7 +694,7 @@ def test_mapping(self): "customAttributes": None, }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) diff --git a/tests/management/test_tenant.py b/tests/management/test_tenant.py index 19141d7e7..2927fac42 100644 --- a/tests/management/test_tenant.py +++ b/tests/management/test_tenant.py @@ -33,7 +33,7 @@ def test_create(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -42,7 +42,7 @@ def test_create(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"id": "t1"}""") @@ -64,18 +64,25 @@ def test_create(self): "enforceSSO": False, "disabled": False, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # Test success flow with custom attributes, enforce_sso, disabled - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"id": "t1"}""") mock_post.return_value = network_resp - resp = client.mgmt.tenant.create("name", "t1", ["domain.com"], {"k1": "v1"}, enforce_sso=True, disabled=True) + resp = client.mgmt.tenant.create( + "name", + "t1", + ["domain.com"], + {"k1": "v1"}, + enforce_sso=True, + disabled=True, + ) self.assertEqual(resp["id"], "t1") mock_post.assert_called_with( f"{common.DEFAULT_BASE_URL}{MgmtV1.tenant_create_path}", @@ -93,7 +100,7 @@ def test_create(self): "enforceSSO": True, "disabled": True, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -107,7 +114,7 @@ def test_update(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -117,10 +124,12 @@ def test_update(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( - client.mgmt.tenant.update("t1", "new-name", ["domain.com"], enforce_sso=True, disabled=True) + client.mgmt.tenant.update( + "t1", "new-name", ["domain.com"], enforce_sso=True, disabled=True + ) ) mock_post.assert_called_with( f"{common.DEFAULT_BASE_URL}{MgmtV1.tenant_update_path}", @@ -137,17 +146,22 @@ def test_update(self): "enforceSSO": True, "disabled": True, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # Test success flow with custom attributes, enforce_sso, disabled - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone( client.mgmt.tenant.update( - "t1", "new-name", ["domain.com"], {"k1": "v1"}, enforce_sso=True, disabled=True + "t1", + "new-name", + ["domain.com"], + {"k1": "v1"}, + enforce_sso=True, + disabled=True, ) ) mock_post.assert_called_with( @@ -163,10 +177,10 @@ def test_update(self): "id": "t1", "selfProvisioningDomains": ["domain.com"], "customAttributes": {"k1": "v1"}, - "enforceSSO": True, + "enforceSSO": True, "disabled": True, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -180,7 +194,7 @@ def test_delete(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -189,7 +203,7 @@ def test_delete(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone(client.mgmt.tenant.delete("t1", True)) mock_post.assert_called_with( @@ -201,7 +215,7 @@ def test_delete(self): }, params=None, json={"id": "t1", "cascade": True}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -215,7 +229,7 @@ def test_load(self): ) # Test failed flows - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: mock_get.return_value.ok = False self.assertRaises( AuthException, @@ -224,7 +238,7 @@ def test_load(self): ) # Test success flow - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -244,7 +258,7 @@ def test_load(self): "x-descope-project-id": self.dummy_project_id, }, params={"id": "t1"}, - allow_redirects=None, + follow_redirects=None, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -258,12 +272,12 @@ def test_load_all(self): ) # Test failed flows - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: mock_get.return_value.ok = False self.assertRaises(AuthException, client.mgmt.tenant.load_all) # Test success flow - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -291,7 +305,7 @@ def test_load_all(self): "x-descope-project-id": self.dummy_project_id, }, params=None, - allow_redirects=None, + follow_redirects=None, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -305,12 +319,12 @@ def test_search_all(self): ) # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, client.mgmt.tenant.search_all) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -347,7 +361,7 @@ def test_search_all(self): "tenantSelfProvisioningDomains": ["spd1"], "customAttributes": {"k1": "v1"}, }, - allow_redirects=False, + follow_redirects=False, verify=True, params=None, timeout=DEFAULT_TIMEOUT_SECONDS, diff --git a/tests/management/test_user.py b/tests/management/test_user.py index 5696c7386..3b5c70bab 100644 --- a/tests/management/test_user.py +++ b/tests/management/test_user.py @@ -40,7 +40,7 @@ def setUp(self) -> None: def test_create(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -49,7 +49,7 @@ def test_create(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -94,14 +94,14 @@ def test_create(self): "additionalLoginIds": ["id-1", "id-2"], "ssoAppIDs": ["app1", "app2"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_create_with_verified_parameters(self): # Test success flow with verified email and phone - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -148,14 +148,14 @@ def test_create_with_verified_parameters(self): "additionalLoginIds": None, "ssoAppIDs": None, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_create_test_user(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -164,7 +164,7 @@ def test_create_test_user(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -206,14 +206,14 @@ def test_create_test_user(self): "additionalLoginIds": None, "ssoAppIDs": None, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_invite(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -222,7 +222,7 @@ def test_invite(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -271,14 +271,14 @@ def test_invite(self): "ssoAppIDs": ["app1", "app2"], "templateId": "tid", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_invite_batch(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -287,7 +287,7 @@ def test_invite_batch(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"users": [{"id": "u1"}]}""") @@ -323,7 +323,7 @@ def test_invite_batch(self): users = resp["users"] self.assertEqual(users[0]["id"], "u1") - expectedUsers = { + expected_users = { "users": [ { "loginId": "name@mail.com", @@ -369,8 +369,8 @@ def test_invite_batch(self): "x-descope-project-id": self.dummy_project_id, }, params=None, - json=expectedUsers, - allow_redirects=False, + json=expected_users, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -403,8 +403,8 @@ def test_invite_batch(self): send_sms=True, ) - del expectedUsers["users"][0]["hashedPassword"] - expectedUsers["users"][0]["password"] = "clear" + del expected_users["users"][0]["hashedPassword"] + expected_users["users"][0]["password"] = "clear" mock_post.assert_called_with( f"{common.DEFAULT_BASE_URL}{MgmtV1.user_create_batch_path}", headers={ @@ -413,8 +413,8 @@ def test_invite_batch(self): "x-descope-project-id": self.dummy_project_id, }, params=None, - json=expectedUsers, - allow_redirects=False, + json=expected_users, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -426,7 +426,7 @@ def test_invite_batch(self): send_sms=True, ) - del expectedUsers["users"][0]["password"] + del expected_users["users"][0]["password"] mock_post.assert_called_with( f"{common.DEFAULT_BASE_URL}{MgmtV1.user_create_batch_path}", headers={ @@ -435,15 +435,15 @@ def test_invite_batch(self): "x-descope-project-id": self.dummy_project_id, }, params=None, - json=expectedUsers, - allow_redirects=False, + json=expected_users, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_update(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -453,7 +453,7 @@ def test_update(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -489,12 +489,12 @@ def test_update(self): "additionalLoginIds": None, "ssoAppIDs": ["app1", "app2"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # Test success flow with verified flags - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -527,14 +527,14 @@ def test_update(self): "additionalLoginIds": None, "ssoAppIDs": None, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_patch(self): # Test failed flows - with patch("requests.patch") as mock_patch: + with patch("httpx.patch") as mock_patch: mock_patch.return_value.ok = False self.assertRaises( AuthException, @@ -544,7 +544,7 @@ def test_patch(self): ) # Test success flow with some params set - with patch("requests.patch") as mock_patch: + with patch("httpx.patch") as mock_patch: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -579,12 +579,12 @@ def test_patch(self): "customAttributes": {"ak": "av"}, "ssoAppIds": ["app1", "app2"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # Test success flow with other params - with patch("requests.patch") as mock_patch: + with patch("httpx.patch") as mock_patch: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -629,14 +629,14 @@ def test_patch(self): {"tenantId": "tenant2", "roleNames": ["role1", "role2"]}, ], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_delete(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -645,7 +645,7 @@ def test_delete(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone(self.client.mgmt.user.delete("u1")) mock_post.assert_called_with( @@ -659,14 +659,14 @@ def test_delete(self): json={ "loginId": "u1", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_delete_by_user_id(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -675,7 +675,7 @@ def test_delete_by_user_id(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone(self.client.mgmt.user.delete_by_user_id("u1")) mock_post.assert_called_with( @@ -689,14 +689,14 @@ def test_delete_by_user_id(self): json={ "userId": "u1", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_logout(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -705,7 +705,7 @@ def test_logout(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone(self.client.mgmt.user.logout_user("u1")) mock_post.assert_called_with( @@ -719,14 +719,14 @@ def test_logout(self): json={ "loginId": "u1", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_logout_by_user_id(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -735,7 +735,7 @@ def test_logout_by_user_id(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNone(self.client.mgmt.user.logout_user_by_user_id("u1")) mock_post.assert_called_with( @@ -749,14 +749,14 @@ def test_logout_by_user_id(self): json={ "userId": "u1", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_delete_all_test_users(self): # Test failed flows - with patch("requests.delete") as mock_delete: + with patch("httpx.delete") as mock_delete: mock_delete.return_value.ok = False self.assertRaises( AuthException, @@ -764,7 +764,7 @@ def test_delete_all_test_users(self): ) # Test success flow - with patch("requests.delete") as mock_delete: + with patch("httpx.delete") as mock_delete: mock_delete.return_value.ok = True self.assertIsNone(self.client.mgmt.user.delete_all_test_users()) mock_delete.assert_called_with( @@ -775,14 +775,14 @@ def test_delete_all_test_users(self): "Authorization": f"Bearer {self.dummy_project_id}:{self.dummy_management_key}", "x-descope-project-id": self.dummy_project_id, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_load(self): # Test failed flows - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: mock_get.return_value.ok = False self.assertRaises( AuthException, @@ -791,7 +791,7 @@ def test_load(self): ) # Test success flow - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -807,14 +807,14 @@ def test_load(self): "x-descope-project-id": self.dummy_project_id, }, params={"loginId": "valid-id"}, - allow_redirects=None, + follow_redirects=None, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_load_by_user_id(self): # Test failed flows - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: mock_get.return_value.ok = False self.assertRaises( AuthException, @@ -823,7 +823,7 @@ def test_load_by_user_id(self): ) # Test success flow - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -839,14 +839,14 @@ def test_load_by_user_id(self): "x-descope-project-id": self.dummy_project_id, }, params={"userId": "user-id"}, - allow_redirects=None, + follow_redirects=None, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_search_all(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -855,7 +855,7 @@ def test_search_all(self): ["r1", "r2"], ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertRaises( AuthException, self.client.mgmt.user.search_all, [], [], -1, 0 @@ -866,7 +866,7 @@ def test_search_all(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -902,13 +902,13 @@ def test_search_all(self): "ssoAppIds": ["app1"], "loginIds": ["l1"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # Test success flow with text and sort - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -950,13 +950,13 @@ def test_search_all(self): {"desc": False, "field": "bubu"}, ], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # Test success flow with custom attributes - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -996,13 +996,13 @@ def test_search_all(self): "emails": ["a@b.com"], "phones": ["+111111"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # Test success flow with time parameters - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -1042,14 +1042,14 @@ def test_search_all(self): "fromModifiedTime": 300, "toModifiedTime": 400, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_search_all_test_users(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1058,7 +1058,7 @@ def test_search_all_test_users(self): ["r1", "r2"], ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertRaises( AuthException, @@ -1079,7 +1079,7 @@ def test_search_all_test_users(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -1114,13 +1114,13 @@ def test_search_all_test_users(self): "ssoAppIds": ["app1"], "loginIds": ["l1"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # Test success flow with text and sort - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -1161,13 +1161,13 @@ def test_search_all_test_users(self): {"desc": False, "field": "bubu"}, ], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # Test success flow with custom attributes - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -1206,13 +1206,13 @@ def test_search_all_test_users(self): "emails": ["a@b.com"], "phones": ["+111111"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # Test success flow with time parameters - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"users": [{"id": "u1"}]}""") @@ -1249,14 +1249,14 @@ def test_search_all_test_users(self): "fromModifiedTime": 300, "toModifiedTime": 400, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_get_provider_token(self): # Test failed flows - with patch("requests.get") as mock_post: + with patch("httpx.get") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1265,7 +1265,7 @@ def test_get_provider_token(self): "p1", ) # Test success flow - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -1294,14 +1294,14 @@ def test_get_provider_token(self): "withRefreshToken": True, "forceRefresh": True, }, - allow_redirects=None, + follow_redirects=None, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_activate(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1310,7 +1310,7 @@ def test_activate(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -1330,14 +1330,14 @@ def test_activate(self): "loginId": "valid-id", "status": "enabled", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_deactivate(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1346,7 +1346,7 @@ def test_deactivate(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -1366,14 +1366,14 @@ def test_deactivate(self): "loginId": "valid-id", "status": "disabled", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_update_login_id(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1383,7 +1383,7 @@ def test_update_login_id(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "a@b.c"}}""") @@ -1403,14 +1403,14 @@ def test_update_login_id(self): "loginId": "valid-id", "newLoginId": "a@b.c", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_update_email(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1420,7 +1420,7 @@ def test_update_email(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -1441,14 +1441,14 @@ def test_update_email(self): "email": "a@b.c", "verified": None, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_update_phone(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1458,7 +1458,7 @@ def test_update_phone(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -1479,14 +1479,14 @@ def test_update_phone(self): "phone": "+18005551234", "verified": True, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_update_display_name(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1496,7 +1496,7 @@ def test_update_display_name(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -1516,14 +1516,14 @@ def test_update_display_name(self): "loginId": "valid-id", "displayName": "foo", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_update_picture(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1533,7 +1533,7 @@ def test_update_picture(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -1553,14 +1553,14 @@ def test_update_picture(self): "loginId": "valid-id", "picture": "foo", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_update_custom_attribute(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1571,7 +1571,7 @@ def test_update_custom_attribute(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -1593,7 +1593,7 @@ def test_update_custom_attribute(self): "attributeKey": "foo", "attributeValue": "bar", }, - allow_redirects=False, + follow_redirects=False, verify=True, params=None, timeout=DEFAULT_TIMEOUT_SECONDS, @@ -1601,7 +1601,7 @@ def test_update_custom_attribute(self): def test_set_roles(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1611,7 +1611,7 @@ def test_set_roles(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -1631,14 +1631,14 @@ def test_set_roles(self): "loginId": "valid-id", "roleNames": ["foo", "bar"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_add_roles(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1648,7 +1648,7 @@ def test_add_roles(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -1668,14 +1668,14 @@ def test_add_roles(self): "loginId": "valid-id", "roleNames": ["foo", "bar"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_remove_roles(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1685,7 +1685,7 @@ def test_remove_roles(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -1705,14 +1705,14 @@ def test_remove_roles(self): "loginId": "valid-id", "roleNames": ["foo", "bar"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_add_sso_apps(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1722,7 +1722,7 @@ def test_add_sso_apps(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -1742,14 +1742,14 @@ def test_add_sso_apps(self): "loginId": "valid-id", "ssoAppIds": ["foo", "bar"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_set_sso_apps(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1759,7 +1759,7 @@ def test_set_sso_apps(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -1779,14 +1779,14 @@ def test_set_sso_apps(self): "loginId": "valid-id", "ssoAppIds": ["foo", "bar"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_remove_sso_apps(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1796,7 +1796,7 @@ def test_remove_sso_apps(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -1816,14 +1816,14 @@ def test_remove_sso_apps(self): "loginId": "valid-id", "ssoAppIds": ["foo", "bar"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_add_tenant(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1833,7 +1833,7 @@ def test_add_tenant(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -1853,14 +1853,14 @@ def test_add_tenant(self): "loginId": "valid-id", "tenantId": "tid", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_remove_tenant(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1870,7 +1870,7 @@ def test_remove_tenant(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -1890,14 +1890,14 @@ def test_remove_tenant(self): "loginId": "valid-id", "tenantId": "tid", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_set_tenant_roles(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1908,7 +1908,7 @@ def test_set_tenant_roles(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -1931,14 +1931,14 @@ def test_set_tenant_roles(self): "tenantId": "tid", "roleNames": ["foo", "bar"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_add_tenant_roles(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1949,7 +1949,7 @@ def test_add_tenant_roles(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -1972,14 +1972,14 @@ def test_add_tenant_roles(self): "tenantId": "tid", "roleNames": ["foo", "bar"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_remove_tenant_roles(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -1990,7 +1990,7 @@ def test_remove_tenant_roles(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"user": {"id": "u1"}}""") @@ -2013,14 +2013,14 @@ def test_remove_tenant_roles(self): "tenantId": "tid", "roleNames": ["foo", "bar"], }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_generate_otp_for_test_user(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -2030,7 +2030,7 @@ def test_generate_otp_for_test_user(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -2060,14 +2060,14 @@ def test_generate_otp_for_test_user(self): "mfa": False, }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_user_set_temporary_password(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -2077,7 +2077,7 @@ def test_user_set_temporary_password(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True mock_post.return_value = network_resp @@ -2098,14 +2098,14 @@ def test_user_set_temporary_password(self): "password": "some-password", "setActive": False, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_user_set_active_password(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -2115,7 +2115,7 @@ def test_user_set_active_password(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True mock_post.return_value = network_resp @@ -2136,14 +2136,14 @@ def test_user_set_active_password(self): "password": "some-password", "setActive": True, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_user_set_password(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -2153,7 +2153,7 @@ def test_user_set_password(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True mock_post.return_value = network_resp @@ -2174,14 +2174,14 @@ def test_user_set_password(self): "password": "some-password", "setActive": False, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_user_expire_password(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -2190,7 +2190,7 @@ def test_user_expire_password(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True mock_post.return_value = network_resp @@ -2208,14 +2208,14 @@ def test_user_expire_password(self): json={ "loginId": "login-id", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_user_remove_all_passkeys(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -2224,7 +2224,7 @@ def test_user_remove_all_passkeys(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True mock_post.return_value = network_resp @@ -2242,14 +2242,14 @@ def test_user_remove_all_passkeys(self): json={ "loginId": "login-id", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_user_remove_totp_seed(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -2258,7 +2258,7 @@ def test_user_remove_totp_seed(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True mock_post.return_value = network_resp @@ -2276,14 +2276,14 @@ def test_user_remove_totp_seed(self): json={ "loginId": "login-id", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_generate_magic_link_for_test_user(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -2294,7 +2294,7 @@ def test_generate_magic_link_for_test_user(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -2325,14 +2325,14 @@ def test_generate_magic_link_for_test_user(self): "mfa": False, }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_generate_enchanted_link_for_test_user(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -2342,7 +2342,7 @@ def test_generate_enchanted_link_for_test_user(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -2373,21 +2373,21 @@ def test_generate_enchanted_link_for_test_user(self): "mfa": False, }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_generate_embedded_link(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, self.client.mgmt.user.generate_embedded_link, "login-id" ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"token": "some-token"}""") @@ -2408,7 +2408,7 @@ def test_generate_embedded_link(self): "customClaims": {"k1": "v1"}, "timeout": 0, }, - allow_redirects=False, + follow_redirects=False, verify=True, params=None, timeout=DEFAULT_TIMEOUT_SECONDS, @@ -2416,14 +2416,16 @@ def test_generate_embedded_link(self): def test_generate_sign_up_embedded_link(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( - AuthException, self.client.mgmt.user.generate_sign_up_embedded_link, "login-id" + AuthException, + self.client.mgmt.user.generate_sign_up_embedded_link, + "login-id", ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads("""{"token": "some-token"}""") @@ -2447,7 +2449,7 @@ def test_generate_sign_up_embedded_link(self): "loginOptions": {}, "timeout": 0, }, - allow_redirects=False, + follow_redirects=False, verify=True, params=None, timeout=DEFAULT_TIMEOUT_SECONDS, @@ -2455,14 +2457,14 @@ def test_generate_sign_up_embedded_link(self): def test_history(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, self.client.mgmt.user.history, ["user-id-1", "user-id-2"] ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: network_resp = mock.Mock() network_resp.ok = True network_resp.json.return_value = json.loads( @@ -2514,7 +2516,7 @@ def test_history(self): "x-descope-project-id": self.dummy_project_id, }, json=["user-id-1", "user-id-2"], - allow_redirects=False, + follow_redirects=False, verify=True, params=None, timeout=DEFAULT_TIMEOUT_SECONDS, diff --git a/tests/test_auth.py b/tests/test_auth.py index 7dba9635f..f9762953f 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -112,17 +112,17 @@ def test_fetch_public_key(self): """ # Test failed flows - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: mock_get.return_value.ok = False self.assertRaises(AuthException, auth._fetch_public_keys) - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: mock_get.return_value.ok = True mock_get.return_value.text = "invalid json" self.assertRaises(AuthException, auth._fetch_public_keys) # test success flow - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: mock_get.return_value.ok = True mock_get.return_value.text = valid_keys_response self.assertIsNone(auth._fetch_public_keys()) @@ -354,7 +354,7 @@ def test_refresh_session(self): auth = Auth(self.dummy_project_id, self.public_key_dict) # Test fail flow - with patch("requests.post") as mock_request: + with patch("httpx.post") as mock_request: mock_request.return_value.ok = False self.assertRaises( AuthException, @@ -370,7 +370,7 @@ def test_validate_session_and_refresh_input(self): auth.validate_and_refresh_session(None, None) # Test validate_session with Ratelimit exception - with patch("requests.get") as mock_request: + with patch("httpx.get") as mock_request: mock_request.return_value.ok = False mock_request.return_value.status_code = 429 mock_request.return_value.json.return_value = { @@ -397,7 +397,7 @@ def test_validate_session_and_refresh_input(self): ) # Test refresh_session with Ratelimit exception - with patch("requests.get") as mock_request: + with patch("httpx.get") as mock_request: mock_request.return_value.ok = False mock_request.return_value.status_code = 429 mock_request.return_value.json.return_value = { @@ -428,7 +428,7 @@ def test_exchange_access_key(self): auth = Auth(self.dummy_project_id, self.public_key_dict) # Test fail flow - with patch("requests.post") as mock_request: + with patch("httpx.post") as mock_request: mock_request.return_value.ok = False self.assertRaises( AuthException, @@ -438,7 +438,7 @@ def test_exchange_access_key(self): # Test success flow valid_jwt_token = "eyJhbGciOiJFUzM4NCIsImtpZCI6IlAyQ3R6VWhkcXBJRjJ5czlnZzdtczA2VXZ0QzQiLCJ0eXAiOiJKV1QifQ.eyJkcm4iOiJEU1IiLCJleHAiOjIyNjQ0Mzc1OTYsImlhdCI6MTY1OTYzNzU5NiwiaXNzIjoiUDJDdHpVaGRxcElGMnlzOWdnN21zMDZVdnRDNCIsInN1YiI6IlUyQ3UwajBXUHczWU9pUElTSmI1Mkwwd1VWTWcifQ.WLnlHugvzZtrV9OzBB7SjpCLNRvKF3ImFpVyIN5orkrjO2iyAKg_Rb4XHk9sXGC1aW8puYzLbhE1Jv3kk2hDcKggfE8OaRNRm8byhGFZHnvPJwcP_Ya-aRmfAvCLcKOL" - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True data = {"sessionJwt": valid_jwt_token} @@ -460,7 +460,7 @@ def test_exchange_access_key(self): }, params=None, json={"loginOptions": {"customClaims": {"k1": "v1"}}}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -557,7 +557,7 @@ def test_api_rate_limit_exception(self): auth = Auth(self.dummy_project_id, self.public_key_dict) # Test do_post - with patch("requests.post") as mock_request: + with patch("httpx.post") as mock_request: mock_request.return_value.ok = False mock_request.return_value.status_code = 429 mock_request.return_value.json.return_value = { @@ -583,7 +583,7 @@ def test_api_rate_limit_exception(self): ) # Test do_get - with patch("requests.get") as mock_request: + with patch("httpx.get") as mock_request: mock_request.return_value.ok = False mock_request.return_value.status_code = 429 mock_request.return_value.json.return_value = { @@ -595,7 +595,7 @@ def test_api_rate_limit_exception(self): API_RATE_LIMIT_RETRY_AFTER_HEADER: "10" } with self.assertRaises(RateLimitException) as cm: - auth.do_get(uri="http://test.com", params=False, allow_redirects=None) + auth.do_get(uri="http://test.com", params=False, follow_redirects=None) the_exception = cm.exception self.assertEqual(the_exception.status_code, "E130429") self.assertEqual(the_exception.error_type, ERROR_TYPE_API_RATE_LIMIT) @@ -609,7 +609,7 @@ def test_api_rate_limit_exception(self): ) # Test do_delete - with patch("requests.delete") as mock_request: + with patch("httpx.delete") as mock_request: mock_request.return_value.ok = False mock_request.return_value.status_code = 429 mock_request.return_value.json.return_value = { @@ -635,7 +635,7 @@ def test_api_rate_limit_exception(self): ) # Test do_delete with params and pswd - with patch("requests.delete") as mock_delete: + with patch("httpx.delete") as mock_delete: network_resp = mock.Mock() network_resp.ok = True @@ -650,13 +650,13 @@ def test_api_rate_limit_exception(self): "Authorization": f"Bearer {self.dummy_project_id}:{'pswd'}", "x-descope-project-id": self.dummy_project_id, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # Test _fetch_public_keys rate limit - with patch("requests.get") as mock_request: + with patch("httpx.get") as mock_request: mock_request.return_value.ok = False mock_request.return_value.status_code = 429 mock_request.return_value.json.return_value = { @@ -685,7 +685,7 @@ def test_api_rate_limit_invalid_header(self): auth = Auth(self.dummy_project_id, self.public_key_dict) # Test do_post empty body - with patch("requests.post") as mock_request: + with patch("httpx.post") as mock_request: mock_request.return_value.ok = False mock_request.return_value.status_code = 429 mock_request.return_value.json.return_value = { @@ -714,7 +714,7 @@ def test_api_rate_limit_invalid_response_body(self): auth = Auth(self.dummy_project_id, self.public_key_dict) # Test do_post empty body - with patch("requests.post") as mock_request: + with patch("httpx.post") as mock_request: mock_request.return_value.ok = False mock_request.return_value.status_code = 429 mock_request.return_value.json.return_value = "aaa" @@ -731,7 +731,7 @@ def test_api_rate_limit_empty_response_body(self): auth = Auth(self.dummy_project_id, self.public_key_dict) # Test do_post empty body - with patch("requests.post") as mock_request: + with patch("httpx.post") as mock_request: mock_request.return_value.ok = False mock_request.return_value.status_code = 429 mock_request.return_value.json.return_value = "" @@ -748,7 +748,7 @@ def test_api_rate_limit_none_response_body(self): auth = Auth(self.dummy_project_id, self.public_key_dict) # Test do_post empty body - with patch("requests.post") as mock_request: + with patch("httpx.post") as mock_request: mock_request.return_value.ok = False mock_request.return_value.status_code = 429 mock_request.return_value.json.return_value = None @@ -763,13 +763,13 @@ def test_api_rate_limit_none_response_body(self): def test_raise_from_response(self): auth = Auth(self.dummy_project_id, self.public_key_dict) - with patch("requests.get") as mock_request: + with patch("httpx.get") as mock_request: mock_request.return_value.ok = False mock_request.return_value.status_code = 400 mock_request.return_value.error_type = ERROR_TYPE_SERVER_ERROR mock_request.return_value.text = """{"errorCode":"E062108","errorDescription":"User not found","errorMessage":"Cannot find user"}""" with self.assertRaises(AuthException) as cm: - auth.do_get(uri="http://test.com", params=False, allow_redirects=None) + auth.do_get(uri="http://test.com", params=False, follow_redirects=None) the_exception = cm.exception self.assertEqual(the_exception.status_code, 400) self.assertEqual(the_exception.error_type, ERROR_TYPE_SERVER_ERROR) diff --git a/tests/test_descope_client.py b/tests/test_descope_client.py index 167338d14..1c2fb83e6 100644 --- a/tests/test_descope_client.py +++ b/tests/test_descope_client.py @@ -75,12 +75,12 @@ def test_logout(self): self.assertRaises(AuthException, client.logout, None) # Test failed flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, client.logout, dummy_refresh_token) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(client.logout(dummy_refresh_token)) @@ -91,12 +91,12 @@ def test_logout_all(self): self.assertRaises(AuthException, client.logout_all, None) # Test failed flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, client.logout_all, dummy_refresh_token) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(client.logout_all(dummy_refresh_token)) @@ -107,12 +107,12 @@ def test_me(self): self.assertRaises(AuthException, client.me, None) # Test failed flow - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: mock_get.return_value.ok = False self.assertRaises(AuthException, client.me, dummy_refresh_token) # Test success flow - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: my_mock_response = mock.Mock() my_mock_response.ok = True data = json.loads( @@ -130,7 +130,7 @@ def test_me(self): "Authorization": f"Bearer {self.dummy_project_id}", "x-descope-project-id": self.dummy_project_id, }, - allow_redirects=None, + follow_redirects=None, verify=True, params=None, timeout=DEFAULT_TIMEOUT_SECONDS, @@ -147,14 +147,14 @@ def test_my_tenants(self): ) # Test failed flow - with patch("requests.post") as mock_get: + with patch("httpx.post") as mock_get: mock_get.return_value.ok = False self.assertRaises( AuthException, client.my_tenants, dummy_refresh_token, True ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True data = json.loads( @@ -175,7 +175,7 @@ def test_my_tenants(self): "x-descope-project-id": self.dummy_project_id, }, json={"dct": False, "ids": ["a"]}, - allow_redirects=False, + follow_redirects=False, verify=True, params=None, timeout=DEFAULT_TIMEOUT_SECONDS, @@ -188,12 +188,12 @@ def test_history(self): self.assertRaises(AuthException, client.history, None) # Test failed flow - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: mock_get.return_value.ok = False self.assertRaises(AuthException, client.history, dummy_refresh_token) # Test success flow - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: my_mock_response = mock.Mock() my_mock_response.ok = True data = json.loads( @@ -228,7 +228,7 @@ def test_history(self): "Authorization": f"Bearer {self.dummy_project_id}", "x-descope-project-id": self.dummy_project_id, }, - allow_redirects=None, + follow_redirects=None, verify=True, params=None, timeout=DEFAULT_TIMEOUT_SECONDS, @@ -339,7 +339,7 @@ def test_validate_session_valid_tokens(self): # Test case where key id cannot be found client2 = DescopeClient(self.dummy_project_id, None) - with patch("requests.get") as mock_request: + with patch("httpx.get") as mock_request: fake_key = deepcopy(self.public_key_dict) # overwrite the kid (so it will not be found) fake_key["kid"] = "dummy_kid" @@ -354,7 +354,7 @@ def test_validate_session_valid_tokens(self): # Test case where we failed to load key client3 = DescopeClient(self.dummy_project_id, None) - with patch("requests.get") as mock_request: + with patch("httpx.get") as mock_request: mock_request.return_value.text = """[{"kid": "dummy_kid"}]""" mock_request.return_value.ok = True self.assertRaises( @@ -367,7 +367,7 @@ def test_validate_session_valid_tokens(self): # Test case where header_alg != key[alg] self.public_key_dict["alg"] = "ES521" client4 = DescopeClient(self.dummy_project_id, self.public_key_dict) - with patch("requests.get") as mock_request: + with patch("httpx.get") as mock_request: mock_request.return_value.text = """[{"kid": "dummy_kid"}]""" mock_request.return_value.ok = True self.assertRaises( @@ -389,7 +389,7 @@ def test_validate_session_valid_tokens(self): # expired_jwt_token = "eyJhbGciOiJFUzM4NCIsImtpZCI6IlAyQ3VDOXl2MlVHdEdJMW84NGdDWkViOXFFUVciLCJ0eXAiOiJKV1QifQ.eyJkcm4iOiJEUyIsImV4cCI6MTY1OTY0NDI5OCwiaWF0IjoxNjU5NjQ0Mjk3LCJpc3MiOiJQMkN1Qzl5djJVR3RHSTFvODRnQ1pFYjlxRVFXIiwic3ViIjoiVTJDdUNQdUpnUFdIR0I1UDRHbWZidVBHaEdWbSJ9.wBuOnIQI_z3SXOszqsWCg8ilOPdE5ruWYHA3jkaeQ3uX9hWgCTd69paFajc-xdMYbqlIF7JHji7T9oVmkCUJvDNgRZRZO9boMFANPyXitLOK4aX3VZpMJBpFxdrWV3GE" valid_refresh_token = valid_jwt_token - with patch("requests.get") as mock_request: + with patch("httpx.get") as mock_request: mock_request.return_value.cookies = {SESSION_COOKIE_NAME: expired_jwt_token} mock_request.return_value.ok = True @@ -443,7 +443,7 @@ def test_expired_token(self): ) # Test fail flow - with patch("requests.get") as mock_request: + with patch("httpx.get") as mock_request: mock_request.return_value.ok = False self.assertRaises( AuthException, @@ -451,7 +451,7 @@ def test_expired_token(self): expired_jwt_token, ) - with patch("requests.get") as mock_request: + with patch("httpx.get") as mock_request: mock_request.return_value.cookies = {"aaa": "aaa"} mock_request.return_value.ok = True self.assertRaises( @@ -476,7 +476,7 @@ def test_expired_token(self): new_session_token = "eyJhbGciOiJFUzM4NCIsImtpZCI6IlAyQ3VDOXl2MlVHdEdJMW84NGdDWkViOXFFUVciLCJ0eXAiOiJKV1QifQ.eyJkcm4iOiJEUyIsImV4cCI6MjQ5MzA2MTQxNSwiaWF0IjoxNjU5NjQzMDYxLCJpc3MiOiJQMkN1Qzl5djJVR3RHSTFvODRnQ1pFYjlxRVFXIiwic3ViIjoiVTJDdUNQdUpnUFdIR0I1UDRHbWZidVBHaEdWbSJ9.gMalOv1GhqYVsfITcOc7Jv_fibX1Iof6AFy2KCVmyHmU2KwATT6XYXsHjBFFLq262Pg-LS1IX9f_DV3ppzvb1pSY4ccsP6WDGd1vJpjp3wFBP9Sji6WXL0SCCJUFIyJR" valid_refresh_token = "eyJhbGciOiJFUzM4NCIsImtpZCI6IlAyQ3VDOXl2MlVHdEdJMW84NGdDWkViOXFFUVciLCJ0eXAiOiJKV1QifQ.eyJkcm4iOiJEU1IiLCJleHAiOjIyNjQ0NDMwNjEsImlhdCI6MTY1OTY0MzA2MSwiaXNzIjoiUDJDdUM5eXYyVUd0R0kxbzg0Z0NaRWI5cUVRVyIsInN1YiI6IlUyQ3VDUHVKZ1BXSEdCNVA0R21mYnVQR2hHVm0ifQ.mRo9FihYMR3qnQT06Mj3CJ5X0uTCEcXASZqfLLUv0cPCLBtBqYTbuK-ZRDnV4e4N6zGCNX2a3jjpbyqbViOxICCNSxJsVb-sdsSujtEXwVMsTTLnpWmNsMbOUiKmoME0" expired_token = "eyJhbGciOiJFUzM4NCIsImtpZCI6IlAyQ3VDOXl2MlVHdEdJMW84NGdDWkViOXFFUVciLCJ0eXAiOiJKV1QifQ.eyJkcm4iOiJEUyIsImV4cCI6MTY1OTY0NDI5OCwiaWF0IjoxNjU5NjQ0Mjk3LCJpc3MiOiJQMkN1Qzl5djJVR3RHSTFvODRnQ1pFYjlxRVFXIiwic3ViIjoiVTJDdUNQdUpnUFdIR0I1UDRHbWZidVBHaEdWbSJ9.wBuOnIQI_z3SXOszqsWCg8ilOPdE5ruWYHA3jkaeQ3uX9hWgCTd69paFajc-xdMYbqlIF7JHji7T9oVmkCUJvDNgRZRZO9boMFANPyXitLOK4aX3VZpMJBpFxdrWV3GE" - with patch("requests.post") as mock_request: + with patch("httpx.post") as mock_request: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"sessionJwt": new_session_token} @@ -510,7 +510,7 @@ def test_expired_token(self): new_refreshed_token = ( expired_jwt_token # the refreshed token should be invalid (or expired) ) - with patch("requests.get") as mock_request: + with patch("httpx.get") as mock_request: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"sessionJwt": new_refreshed_token} @@ -745,7 +745,7 @@ def test_exchange_access_key(self): ) dummy_access_key = "dummy access key" valid_jwt_token = "eyJhbGciOiJFUzM4NCIsImtpZCI6IlAyQ3VDOXl2MlVHdEdJMW84NGdDWkViOXFFUVciLCJ0eXAiOiJKV1QifQ.eyJkcm4iOiJEU1IiLCJleHAiOjIyNjQ0NDMwNjEsImlhdCI6MTY1OTY0MzA2MSwiaXNzIjoiUDJDdUM5eXYyVUd0R0kxbzg0Z0NaRWI5cUVRVyIsInN1YiI6IlUyQ3VDUHVKZ1BXSEdCNVA0R21mYnVQR2hHVm0ifQ.mRo9FihYMR3qnQT06Mj3CJ5X0uTCEcXASZqfLLUv0cPCLBtBqYTbuK-ZRDnV4e4N6zGCNX2a3jjpbyqbViOxICCNSxJsVb-sdsSujtEXwVMsTTLnpWmNsMbOUiKmoME0" - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True data = {"sessionJwt": valid_jwt_token} @@ -767,7 +767,7 @@ def test_exchange_access_key(self): }, params=None, json={"loginOptions": {"customClaims": {"k1": "v1"}}}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -814,7 +814,7 @@ def test_select_tenant(self): valid_jwt_token = "eyJhbGciOiJFUzM4NCIsImtpZCI6IlAyQ3VDOXl2MlVHdEdJMW84NGdDWkViOXFFUVciLCJ0eXAiOiJKV1QifQ.eyJkcm4iOiJEU1IiLCJleHAiOjIyNjQ0NDMwNjEsImlhdCI6MTY1OTY0MzA2MSwiaXNzIjoiUDJDdUM5eXYyVUd0R0kxbzg0Z0NaRWI5cUVRVyIsInN1YiI6IlUyQ3VDUHVKZ1BXSEdCNVA0R21mYnVQR2hHVm0ifQ.mRo9FihYMR3qnQT06Mj3CJ5X0uTCEcXASZqfLLUv0cPCLBtBqYTbuK-ZRDnV4e4N6zGCNX2a3jjpbyqbViOxICCNSxJsVb-sdsSujtEXwVMsTTLnpWmNsMbOUiKmoME0" - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True my_mock_response = mock.Mock() my_mock_response.ok = True @@ -836,7 +836,7 @@ def test_select_tenant(self): json={ "tenant": "t1", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) diff --git a/tests/test_enchantedlink.py b/tests/test_enchantedlink.py index d34a81c36..7bacbd1f4 100644 --- a/tests/test_enchantedlink.py +++ b/tests/test_enchantedlink.py @@ -97,7 +97,7 @@ def test_compose_body(self): def test_sign_in(self): enchantedlink = EnchantedLink(Auth(self.dummy_project_id, self.public_key_dict)) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True # Test failed flows @@ -120,7 +120,7 @@ def test_sign_in(self): "URI": "http://test.me", "loginOptions": {}, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -128,7 +128,7 @@ def test_sign_in(self): self.assertEqual(res["linkId"], "24") # Validate refresh token used while provided - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: refresh_token = "dummy refresh token" enchantedlink.sign_in( "dummy@dummy.com", @@ -153,13 +153,13 @@ def test_sign_in(self): "mfa": False, }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # With template options - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: refresh_token = "dummy refresh token" enchantedlink.sign_in( "dummy@dummy.com", @@ -192,14 +192,14 @@ def test_sign_in(self): "mfa": False, }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_sign_in_with_login_options(self): enchantedlink = EnchantedLink(Auth(self.dummy_project_id, self.public_key_dict)) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True data = json.loads("""{"pendingRef": "aaaa", "linkId":"24"}""") @@ -224,14 +224,14 @@ def test_sign_in_with_login_options(self): "mfa": False, }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) def test_sign_up(self): enchantedlink = EnchantedLink(Auth(self.dummy_project_id, self.public_key_dict)) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True @@ -266,14 +266,14 @@ def test_sign_up(self): "user": {"username": "user1", "email": "dummy@dummy.com"}, "email": "dummy@dummy.com", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) self.assertEqual(res["pendingRef"], "aaaa") # Test user is None so using the login_id as default - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: data = json.loads("""{"pendingRef": "aaaa"}""") my_mock_response.json.return_value = data mock_post.return_value = my_mock_response @@ -296,14 +296,14 @@ def test_sign_up(self): "user": {"email": "dummy@dummy.com"}, "email": "dummy@dummy.com", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) self.assertEqual(res["pendingRef"], "aaaa") # Test success flow with sign up options - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: data = json.loads("""{"pendingRef": "aaaa"}""") my_mock_response.json.return_value = data mock_post.return_value = my_mock_response @@ -336,7 +336,7 @@ def test_sign_up(self): "revokeOtherSessions": True, }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -344,7 +344,7 @@ def test_sign_up(self): def test_sign_up_or_in(self): enchantedlink = EnchantedLink(Auth(self.dummy_project_id, self.public_key_dict)) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True data = json.loads("""{"pendingRef": "aaaa"}""") @@ -367,13 +367,13 @@ def test_sign_up_or_in(self): "URI": "http://test.me", "loginOptions": {}, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # Test success flow with sign up options - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True data = json.loads("""{"pendingRef": "aaaa"}""") @@ -402,7 +402,7 @@ def test_sign_up_or_in(self): "templateOptions": {"bla": "blue"}, }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -412,7 +412,7 @@ def test_verify(self): enchantedlink = EnchantedLink(Auth(self.dummy_project_id, self.public_key_dict)) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -422,7 +422,7 @@ def test_verify(self): # Test success flow valid_jwt_token = "eyJhbGciOiJFUzM4NCIsImtpZCI6IlAyQ3R6VWhkcXBJRjJ5czlnZzdtczA2VXZ0QzQiLCJ0eXAiOiJKV1QifQ.eyJkcm4iOiJEU1IiLCJleHAiOjIyNjQ0Mzc1OTYsImlhdCI6MTY1OTYzNzU5NiwiaXNzIjoiUDJDdHpVaGRxcElGMnlzOWdnN21zMDZVdnRDNCIsInN1YiI6IlUyQ3UwajBXUHczWU9pUElTSmI1Mkwwd1VWTWcifQ.WLnlHugvzZtrV9OzBB7SjpCLNRvKF3ImFpVyIN5orkrjO2iyAKg_Rb4XHk9sXGC1aW8puYzLbhE1Jv3kk2hDcKggfE8OaRNRm8byhGFZHnvPJwcP_Ya-aRmfAvCLcKOL" - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {} @@ -437,7 +437,7 @@ def test_get_session(self): enchantedlink = EnchantedLink(Auth(self.dummy_project_id, self.public_key_dict)) valid_jwt_token = "eyJhbGciOiJFUzM4NCIsImtpZCI6IlAyQ3R6VWhkcXBJRjJ5czlnZzdtczA2VXZ0QzQiLCJ0eXAiOiJKV1QifQ.eyJkcm4iOiJEU1IiLCJleHAiOjIyNjQ0Mzc1OTYsImlhdCI6MTY1OTYzNzU5NiwiaXNzIjoiUDJDdHpVaGRxcElGMnlzOWdnN21zMDZVdnRDNCIsInN1YiI6IlUyQ3UwajBXUHczWU9pUElTSmI1Mkwwd1VWTWcifQ.WLnlHugvzZtrV9OzBB7SjpCLNRvKF3ImFpVyIN5orkrjO2iyAKg_Rb4XHk9sXGC1aW8puYzLbhE1Jv3kk2hDcKggfE8OaRNRm8byhGFZHnvPJwcP_Ya-aRmfAvCLcKOL" - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {} @@ -450,7 +450,7 @@ def test_get_session(self): def test_update_user_email(self): enchantedlink = EnchantedLink(Auth(self.dummy_project_id, self.public_key_dict)) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True # Test failed flows @@ -481,14 +481,14 @@ def test_update_user_email(self): "addToLoginIDs": False, "onMergeUseExisting": False, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, params=None, ) # with template options - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True data = json.loads("""{"pendingRef": "aaaa"}""") @@ -515,7 +515,7 @@ def test_update_user_email(self): "onMergeUseExisting": False, "templateOptions": {"bla": "blue"}, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, params=None, diff --git a/tests/test_magiclink.py b/tests/test_magiclink.py index c851b48cd..2dbbc9205 100644 --- a/tests/test_magiclink.py +++ b/tests/test_magiclink.py @@ -123,7 +123,7 @@ def test_sign_in(self): "http://test.me", ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -134,7 +134,7 @@ def test_sign_in(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedEmail": "t***@example.com"} @@ -157,7 +157,7 @@ def test_sign_in(self): ) # Validate refresh token used while provided - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: refresh_token = "dummy refresh token" magiclink.sign_in( DeliveryMethod.EMAIL, @@ -183,13 +183,13 @@ def test_sign_in(self): "mfa": False, }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # With template options - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: refresh_token = "dummy refresh token" magiclink.sign_in( DeliveryMethod.EMAIL, @@ -218,7 +218,7 @@ def test_sign_in(self): "mfa": False, }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -243,7 +243,7 @@ def test_sign_up(self): signup_user_details, ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -255,7 +255,7 @@ def test_sign_up(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedEmail": "t***@example.com"} @@ -269,7 +269,7 @@ def test_sign_up(self): self.assertEqual("t***@example.com", resp) # Test success flow with sign up options - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedEmail": "t***@example.com"} @@ -305,7 +305,7 @@ def test_sign_up(self): "templateId": "foo", }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, params=None, @@ -319,7 +319,7 @@ def test_sign_up(self): "email": "dummy@dummy.com", } - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedEmail": "t***@example.com"} @@ -351,14 +351,14 @@ def test_sign_up(self): }, "email": "dummy@dummy.com", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, params=None, ) # Test user is None so using the login_id as default - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedEmail": "t***@example.com"} @@ -385,7 +385,7 @@ def test_sign_up(self): "user": {"email": "dummy@dummy.com"}, "email": "dummy@dummy.com", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, params=None, @@ -396,7 +396,7 @@ def test_sign_up_or_in(self): # Test failed flows - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -407,7 +407,7 @@ def test_sign_up_or_in(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedEmail": "t***@example.com"} @@ -420,7 +420,7 @@ def test_sign_up_or_in(self): ) # Test success flow with sign up options - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedEmail": "t***@example.com"} @@ -452,7 +452,7 @@ def test_sign_up_or_in(self): "templateId": "foo", }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, params=None, @@ -463,7 +463,7 @@ def test_verify(self): magiclink = MagicLink(Auth(self.dummy_project_id, self.public_key_dict)) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -473,7 +473,7 @@ def test_verify(self): # Test success flow valid_jwt_token = "eyJhbGciOiJFUzM4NCIsImtpZCI6IlAyQ3R6VWhkcXBJRjJ5czlnZzdtczA2VXZ0QzQiLCJ0eXAiOiJKV1QifQ.eyJkcm4iOiJEU1IiLCJleHAiOjIyNjQ0Mzc1OTYsImlhdCI6MTY1OTYzNzU5NiwiaXNzIjoiUDJDdHpVaGRxcElGMnlzOWdnN21zMDZVdnRDNCIsInN1YiI6IlUyQ3UwajBXUHczWU9pUElTSmI1Mkwwd1VWTWcifQ.WLnlHugvzZtrV9OzBB7SjpCLNRvKF3ImFpVyIN5orkrjO2iyAKg_Rb4XHk9sXGC1aW8puYzLbhE1Jv3kk2hDcKggfE8OaRNRm8byhGFZHnvPJwcP_Ya-aRmfAvCLcKOL" - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {} @@ -492,11 +492,11 @@ def test_verify_with_get_keys_mock(self): # Test success flow valid_jwt_token = "eyJhbGciOiJFUzM4NCIsImtpZCI6IlAyQ3R6VWhkcXBJRjJ5czlnZzdtczA2VXZ0QzQiLCJ0eXAiOiJKV1QifQ.eyJkcm4iOiJEU1IiLCJleHAiOjIyNjQ0Mzc1OTYsImlhdCI6MTY1OTYzNzU5NiwiaXNzIjoiUDJDdHpVaGRxcElGMnlzOWdnN21zMDZVdnRDNCIsInN1YiI6IlUyQ3UwajBXUHczWU9pUElTSmI1Mkwwd1VWTWcifQ.WLnlHugvzZtrV9OzBB7SjpCLNRvKF3ImFpVyIN5orkrjO2iyAKg_Rb4XHk9sXGC1aW8puYzLbhE1Jv3kk2hDcKggfE8OaRNRm8byhGFZHnvPJwcP_Ya-aRmfAvCLcKOL" - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: mock_get.return_value.text = json.dumps({"keys": [self.public_key_dict]}) mock_get.return_value.ok = True - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {} @@ -518,7 +518,7 @@ def test_update_user_email(self): "refresh_token1", ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -529,7 +529,7 @@ def test_update_user_email(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedEmail": "t***@example.com"} @@ -551,14 +551,14 @@ def test_update_user_email(self): "addToLoginIDs": False, "onMergeUseExisting": False, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, params=None, ) # Test success flow with template options - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedEmail": "t***@example.com"} @@ -586,7 +586,7 @@ def test_update_user_email(self): "onMergeUseExisting": False, "templateOptions": {"bla": "blue"}, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, params=None, @@ -604,7 +604,7 @@ def test_update_user_phone(self): "refresh_token1", ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -616,7 +616,7 @@ def test_update_user_phone(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedPhone": "*****1111"} @@ -640,14 +640,14 @@ def test_update_user_phone(self): "addToLoginIDs": False, "onMergeUseExisting": False, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, params=None, ) # Test success flow with template options - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedPhone": "*****1111"} @@ -676,7 +676,7 @@ def test_update_user_phone(self): "onMergeUseExisting": False, "templateOptions": {"bla": "blue"}, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, params=None, diff --git a/tests/test_oauth.py b/tests/test_oauth.py index eed6bc468..aad4b1d6a 100644 --- a/tests/test_oauth.py +++ b/tests/test_oauth.py @@ -48,12 +48,12 @@ def test_oauth_start(self): # Test failed flows self.assertRaises(AuthException, oauth.start, "") - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, oauth.start, "google") # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(oauth.start("google")) @@ -65,7 +65,7 @@ def test_oauth_start(self): LoginOptions(mfa=True), ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True oauth.start("facebook") expected_uri = f"{common.DEFAULT_BASE_URL}{EndpointsV1.oauth_start_path}" @@ -78,7 +78,7 @@ def test_oauth_start(self): }, params={"provider": "facebook"}, json={}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -89,16 +89,16 @@ def test_oauth_start_with_login_options(self): # Test failed flows self.assertRaises(AuthException, oauth.start, "") - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, oauth.start, "google") # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(oauth.start("google")) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True lo = LoginOptions(stepup=True, custom_claims={"k1": "v1"}) oauth.start("facebook", login_options=lo, refresh_token="refresh") @@ -112,7 +112,7 @@ def test_oauth_start_with_login_options(self): }, params={"provider": "facebook"}, json={"stepup": True, "customClaims": {"k1": "v1"}, "mfa": False}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -127,12 +127,12 @@ def test_exchange_token(self): self.assertRaises(AuthException, oauth.exchange_token, "") self.assertRaises(AuthException, oauth.exchange_token, None) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, oauth.exchange_token, "c1") # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.cookies = {} @@ -151,7 +151,7 @@ def test_exchange_token(self): }, params=None, json={"code": "c1"}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) diff --git a/tests/test_otp.py b/tests/test_otp.py index 4e2713b99..a9917a480 100644 --- a/tests/test_otp.py +++ b/tests/test_otp.py @@ -182,7 +182,7 @@ def test_sign_up(self): invalid_signup_user_details, ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -193,7 +193,7 @@ def test_sign_up(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedEmail": "t***@example.com"} @@ -213,7 +213,7 @@ def test_sign_up(self): "email": "dummy@dummy.com", } - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedEmail": "t***@example.com"} @@ -242,13 +242,13 @@ def test_sign_up(self): }, "email": "dummy@dummy.com", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # Test success flow with sign up options - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedEmail": "t***@example.com"} @@ -284,13 +284,13 @@ def test_sign_up(self): "templateId": "foo", }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # Test user is None so using the login_id as default - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedEmail": "t***@example.com"} @@ -312,7 +312,7 @@ def test_sign_up(self): "user": {"email": "dummy@dummy.com"}, "email": "dummy@dummy.com", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -330,7 +330,7 @@ def test_sign_in(self): self.assertRaises(AuthException, client.otp.sign_in, DeliveryMethod.EMAIL, "") self.assertRaises(AuthException, client.otp.sign_in, DeliveryMethod.EMAIL, None) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -340,7 +340,7 @@ def test_sign_in(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedEmail": "t***@example.com"} @@ -358,7 +358,7 @@ def test_sign_in(self): ) # Validate refresh token used while provided - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: refresh_token = "dummy refresh token" client.otp.sign_in( DeliveryMethod.EMAIL, @@ -382,13 +382,13 @@ def test_sign_in(self): "mfa": False, }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # With template options - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: refresh_token = "dummy refresh token" client.otp.sign_in( DeliveryMethod.EMAIL, @@ -416,7 +416,7 @@ def test_sign_in(self): "mfa": False, }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -429,7 +429,7 @@ def test_sign_up_or_in(self): AuthException, client.otp.sign_up_or_in, DeliveryMethod.EMAIL, "" ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -439,7 +439,7 @@ def test_sign_up_or_in(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedEmail": "t***@example.com"} @@ -450,7 +450,7 @@ def test_sign_up_or_in(self): ) # Test success flow with sign up options - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedEmail": "t***@example.com"} @@ -480,7 +480,7 @@ def test_sign_up_or_in(self): "templateId": "foo", }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, params=None, @@ -498,7 +498,7 @@ def test_verify_code(self): AuthException, client.otp.verify_code, DeliveryMethod.EMAIL, None, code ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -510,7 +510,7 @@ def test_verify_code(self): # Test success flow valid_jwt_token = "eyJhbGciOiJFUzM4NCIsImtpZCI6IlAyQ3R6VWhkcXBJRjJ5czlnZzdtczA2VXZ0QzQiLCJ0eXAiOiJKV1QifQ.eyJkcm4iOiJEU1IiLCJleHAiOjIyNjQ0Mzc1OTYsImlhdCI6MTY1OTYzNzU5NiwiaXNzIjoiUDJDdHpVaGRxcElGMnlzOWdnN21zMDZVdnRDNCIsInN1YiI6IlUyQ3UwajBXUHczWU9pUElTSmI1Mkwwd1VWTWcifQ.WLnlHugvzZtrV9OzBB7SjpCLNRvKF3ImFpVyIN5orkrjO2iyAKg_Rb4XHk9sXGC1aW8puYzLbhE1Jv3kk2hDcKggfE8OaRNRm8byhGFZHnvPJwcP_Ya-aRmfAvCLcKOL" - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {} @@ -543,7 +543,7 @@ def test_update_user_email(self): "refresh_token1", ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -554,7 +554,7 @@ def test_update_user_email(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedEmail": "t***@example.com"} @@ -578,14 +578,14 @@ def test_update_user_email(self): "addToLoginIDs": False, "onMergeUseExisting": False, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, params=None, ) # Test success flow with template options - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedEmail": "t***@example.com"} @@ -613,7 +613,7 @@ def test_update_user_email(self): "onMergeUseExisting": False, "templateOptions": {"bla": "blue"}, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, params=None, @@ -648,7 +648,7 @@ def test_update_user_phone(self): "refresh_token1", ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -660,7 +660,7 @@ def test_update_user_phone(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedPhone": "*****111"} @@ -684,13 +684,13 @@ def test_update_user_phone(self): "addToLoginIDs": False, "onMergeUseExisting": False, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, params=None, ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedPhone": "*****111"} @@ -714,13 +714,13 @@ def test_update_user_phone(self): "addToLoginIDs": False, "onMergeUseExisting": False, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, params=None, ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedPhone": "*****111"} @@ -744,14 +744,14 @@ def test_update_user_phone(self): "addToLoginIDs": False, "onMergeUseExisting": False, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, params=None, ) # Test success flow with template options - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = {"maskedPhone": "*****111"} @@ -780,7 +780,7 @@ def test_update_user_phone(self): "onMergeUseExisting": False, "templateOptions": {"bla": "blue"}, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, params=None, diff --git a/tests/test_password.py b/tests/test_password.py index 51a97862b..5e98cf531 100644 --- a/tests/test_password.py +++ b/tests/test_password.py @@ -67,7 +67,7 @@ def test_sign_up(self): signup_user_details, ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -78,7 +78,7 @@ def test_sign_up(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True my_mock_response = mock.Mock() my_mock_response.ok = True @@ -111,7 +111,7 @@ def test_sign_up(self): "email": "dummy@dummy.com", }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -148,7 +148,7 @@ def test_sign_in(self): None, ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -158,7 +158,7 @@ def test_sign_in(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True my_mock_response = mock.Mock() my_mock_response.ok = True @@ -183,7 +183,7 @@ def test_sign_in(self): "loginId": "dummy@dummy.com", "password": "123456", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -204,7 +204,7 @@ def test_send_reset(self): None, ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -213,7 +213,7 @@ def test_send_reset(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True my_mock_response = mock.Mock() my_mock_response.ok = True @@ -240,13 +240,13 @@ def test_send_reset(self): "loginId": "dummy@dummy.com", "redirectUrl": "https://redirect.here.com", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) # Test success flow with template options - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True my_mock_response = mock.Mock() my_mock_response.ok = True @@ -278,7 +278,7 @@ def test_send_reset(self): "redirectUrl": "https://redirect.here.com", "templateOptions": {"bla": "blue"}, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -335,7 +335,7 @@ def test_update(self): None, ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -346,7 +346,7 @@ def test_update(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True valid_jwt_token = "eyJhbGciOiJFUzM4NCIsImtpZCI6IjJCdDVXTGNjTFVleTFEcDd1dHB0WmIzRng5SyIsInR5cCI6IkpXVCJ9.eyJhdXRob3JpemVkVGVuYW50cyI6eyIiOm51bGx9LCJjb29raWVEb21haW4iOiIiLCJjb29raWVFeHBpcmF0aW9uIjoxNjYwNjc5MjA4LCJjb29raWVNYXhBZ2UiOjI1OTE5OTksImNvb2tpZU5hbWUiOiJEU1IiLCJjb29raWVQYXRoIjoiLyIsImV4cCI6MjA5MDA4NzIwOCwiaWF0IjoxNjU4MDg3MjA4LCJpc3MiOiIyQnQ1V0xjY0xVZXkxRHA3dXRwdFpiM0Z4OUsiLCJzdWIiOiIyQzU1dnl4dzBzUkw2RmRNNjhxUnNDRGRST1YifQ.cWP5up4R5xeIl2qoG2NtfLH3Q5nRJVKdz-FDoAXctOQW9g3ceZQi6rZQ-TPBaXMKw68bijN3bLJTqxWW5WHzqRUeopfuzTcMYmC0wP2XGJkrdF6A8D5QW6acSGqglFgu" self.assertIsNone( @@ -364,7 +364,7 @@ def test_update(self): "loginId": "dummy@dummy.com", "newPassword": "123456", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -421,7 +421,7 @@ def test_replace(self): None, ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -432,7 +432,7 @@ def test_replace(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True my_mock_response = mock.Mock() my_mock_response.ok = True @@ -460,7 +460,7 @@ def test_replace(self): "oldPassword": "123456", "newPassword": "1234567", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -468,7 +468,7 @@ def test_replace(self): def test_policy(self): password = Password(Auth(self.dummy_project_id, self.public_key_dict)) - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: mock_get.return_value.ok = False self.assertRaises( AuthException, @@ -476,7 +476,7 @@ def test_policy(self): ) # Test success flow - with patch("requests.get") as mock_get: + with patch("httpx.get") as mock_get: mock_get.return_value.ok = True my_mock_response = mock.Mock() my_mock_response.ok = True @@ -493,7 +493,7 @@ def test_policy(self): "x-descope-project-id": self.dummy_project_id, }, params=None, - allow_redirects=None, + follow_redirects=None, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) diff --git a/tests/test_saml.py b/tests/test_saml.py index 804fb9a05..dc10a03cc 100644 --- a/tests/test_saml.py +++ b/tests/test_saml.py @@ -40,16 +40,16 @@ def test_saml_start(self): self.assertRaises(AuthException, saml.start, "tenant1", "") self.assertRaises(AuthException, saml.start, "tenant1", None) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, saml.start, "tenant1", "http://dummy.com") # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(saml.start("tenant1", "http://dummy.com")) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True saml.start("tenant1", "http://dummy.com") expected_uri = ( @@ -64,7 +64,7 @@ def test_saml_start(self): }, params={"tenant": "tenant1", "redirectURL": "http://dummy.com"}, json={}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -85,16 +85,16 @@ def test_saml_start_with_login_options(self): self.assertRaises(AuthException, saml.start, "tenant1", "") self.assertRaises(AuthException, saml.start, "tenant1", None) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, saml.start, "tenant1", "http://dummy.com") # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(saml.start("tenant1", "http://dummy.com")) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True lo = LoginOptions(stepup=True, custom_claims={"k1": "v1"}) saml.start("tenant1", "http://dummy.com", lo, "refresh") @@ -110,7 +110,7 @@ def test_saml_start_with_login_options(self): }, params={"tenant": "tenant1", "redirectURL": "http://dummy.com"}, json={"stepup": True, "customClaims": {"k1": "v1"}, "mfa": False}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -125,12 +125,12 @@ def test_exchange_token(self): self.assertRaises(AuthException, saml.exchange_token, "") self.assertRaises(AuthException, saml.exchange_token, None) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, saml.exchange_token, "c1") # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.cookies = {} @@ -149,7 +149,7 @@ def test_exchange_token(self): }, params=None, json={"code": "c1"}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) diff --git a/tests/test_sso.py b/tests/test_sso.py index eb555fc3f..9716a6391 100644 --- a/tests/test_sso.py +++ b/tests/test_sso.py @@ -48,16 +48,16 @@ def test_sso_start(self): self.assertRaises(AuthException, sso.start, "", "http://dummy.com") self.assertRaises(AuthException, sso.start, None, "http://dummy.com") - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, sso.start, "tenant1", "http://dummy.com") # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(sso.start("tenant1", "http://dummy.com")) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True sso.start("tenant1", "http://dummy.com", sso_id="some-sso-id") expected_uri = f"{common.DEFAULT_BASE_URL}{EndpointsV1.auth_sso_start_path}" @@ -74,7 +74,7 @@ def test_sso_start(self): "ssoId": "some-sso-id", }, json={}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -93,16 +93,16 @@ def test_sso_start_with_login_options(self): self.assertRaises(AuthException, sso.start, "", "http://dummy.com") self.assertRaises(AuthException, sso.start, None, "http://dummy.com") - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, sso.start, "tenant1", "http://dummy.com") # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(sso.start("tenant1", "http://dummy.com")) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True lo = LoginOptions(stepup=True, custom_claims={"k1": "v1"}) sso.start("tenant1", "http://dummy.com", lo, "refresh") @@ -116,7 +116,7 @@ def test_sso_start_with_login_options(self): }, params={"tenant": "tenant1", "redirectURL": "http://dummy.com"}, json={"stepup": True, "customClaims": {"k1": "v1"}, "mfa": False}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -131,12 +131,12 @@ def test_exchange_token(self): self.assertRaises(AuthException, sso.exchange_token, "") self.assertRaises(AuthException, sso.exchange_token, None) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises(AuthException, sso.exchange_token, "c1") # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.cookies = {} @@ -155,7 +155,7 @@ def test_exchange_token(self): }, params=None, json={"code": "c1"}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) diff --git a/tests/test_totp.py b/tests/test_totp.py index 19f372965..1a6e55960 100644 --- a/tests/test_totp.py +++ b/tests/test_totp.py @@ -49,7 +49,7 @@ def test_sign_up(self): signup_user_details, ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -59,7 +59,7 @@ def test_sign_up(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(totp.sign_up("dummy@dummy.com", signup_user_details)) @@ -72,14 +72,14 @@ def test_sign_in(self): self.assertRaises(AuthException, totp.sign_in_code, "dummy@dummy.com", None) self.assertRaises(AuthException, totp.sign_in_code, "dummy@dummy.com", "") - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, totp.sign_in_code, "dummy@dummy.com", "1234" ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.cookies = {} @@ -98,7 +98,7 @@ def test_sign_in(self): ) # Validate refresh token used while provided - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.cookies = {} @@ -131,7 +131,7 @@ def test_sign_in(self): "mfa": False, }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -145,7 +145,7 @@ def test_update_user(self): self.assertRaises(AuthException, totp.update_user, "dummy@dummy.com", None) self.assertRaises(AuthException, totp.update_user, "dummy@dummy.com", "") - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -173,7 +173,7 @@ def test_update_user(self): }, params=None, json={"loginId": "dummy@dummy.com"}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) diff --git a/tests/test_webauthn.py b/tests/test_webauthn.py index 3a3a0bf02..ade843b6a 100644 --- a/tests/test_webauthn.py +++ b/tests/test_webauthn.py @@ -88,7 +88,7 @@ def test_sign_up_start(self): ) self.assertRaises(AuthException, webauthn.sign_up_start, "id1", "") - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, webauthn.sign_up_start, "id1", "https://example.com" @@ -98,11 +98,11 @@ def test_sign_up_start(self): valid_response = json.loads( """{"transactionId": "2COHI3LIixYhf6Q7EECYt20zyMi", "options": "{'publicKey':{'challenge':'5GOywA7BHL1QceQOfxHKDrasuN8SkbbgXmB5ImVZ+QU=','rp':{'name':'comp6','id':'localhost'},'user':{'name”:”dummy@dummy.com','displayName”:”dummy”,”id':'VTJDT0hJNWlWOHJaZ3VURkpKMzV3bjEydHRkTw=='},'pubKeyCredParams':[{'type':'public-key','alg':-7},{'type':'public-key','alg':-35},{'type':'public-key','alg':-36},{'type':'public-key','alg':-257},{'type':'public-key','alg':-258},{'type':'public-key','alg':-259},{'type':'public-key','alg':-37},{'type':'public-key','alg':-38},{'type':'public-key','alg':-39},{'type':'public-key','alg':-8}],'authenticatorSelection':{'userVerification':'preferred'},'timeout':60000,'attestation':'none'}}"}""" ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone(webauthn.sign_up_start("id1", "https://example.com")) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = valid_response @@ -119,7 +119,7 @@ def test_sign_up_start(self): }, params=None, json={"user": {"loginId": "id1"}, "origin": "https://example.com"}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -134,14 +134,14 @@ def test_sign_up_finish(self): self.assertRaises(AuthException, webauthn.sign_up_finish, "t01", "") self.assertRaises(AuthException, webauthn.sign_up_finish, "t01", None) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, webauthn.sign_up_finish, "t01", "response01" ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.cookies = {} @@ -169,7 +169,7 @@ def test_sign_up_finish(self): }, params=None, json={"transactionId": "t01", "response": "response01"}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -184,7 +184,7 @@ def test_sign_in_start(self): ) self.assertRaises(AuthException, webauthn.sign_in_start, "id", "") - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -197,7 +197,7 @@ def test_sign_in_start(self): valid_response = json.loads( """{"transactionId": "2COHI3LIixYhf6Q7EECYt20zyMi", "options": "{'publicKey':{'challenge':'5GOywA7BHL1QceQOfxHKDrasuN8SkbbgXmB5ImVZ+QU=','rp':{'name':'comp6','id':'localhost'},'user':{'name”:”dummy@dummy.com','displayName”:”dummy”,”id':'VTJDT0hJNWlWOHJaZ3VURkpKMzV3bjEydHRkTw=='},'pubKeyCredParams':[{'type':'public-key','alg':-7},{'type':'public-key','alg':-35},{'type':'public-key','alg':-36},{'type':'public-key','alg':-257},{'type':'public-key','alg':-258},{'type':'public-key','alg':-259},{'type':'public-key','alg':-37},{'type':'public-key','alg':-38},{'type':'public-key','alg':-39},{'type':'public-key','alg':-8}],'authenticatorSelection':{'userVerification':'preferred'},'timeout':60000,'attestation':'none'}}"}""" ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone( webauthn.sign_in_start("dummy@dummy.com", "https://example.com") @@ -210,7 +210,7 @@ def test_sign_in_start(self): LoginOptions(mfa=True), ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = valid_response @@ -230,7 +230,7 @@ def test_sign_in_start(self): "origin": "https://example.com", "loginOptions": {}, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -245,7 +245,7 @@ def test_sign_in_start_with_login_options(self): ) self.assertRaises(AuthException, webauthn.sign_in_start, "id", "") - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -258,13 +258,13 @@ def test_sign_in_start_with_login_options(self): valid_response = json.loads( """{"transactionId": "2COHI3LIixYhf6Q7EECYt20zyMi", "options": "{'publicKey':{'challenge':'5GOywA7BHL1QceQOfxHKDrasuN8SkbbgXmB5ImVZ+QU=','rp':{'name':'comp6','id':'localhost'},'user':{'name”:”dummy@dummy.com','displayName”:”dummy”,”id':'VTJDT0hJNWlWOHJaZ3VURkpKMzV3bjEydHRkTw=='},'pubKeyCredParams':[{'type':'public-key','alg':-7},{'type':'public-key','alg':-35},{'type':'public-key','alg':-36},{'type':'public-key','alg':-257},{'type':'public-key','alg':-258},{'type':'public-key','alg':-259},{'type':'public-key','alg':-37},{'type':'public-key','alg':-38},{'type':'public-key','alg':-39},{'type':'public-key','alg':-8}],'authenticatorSelection':{'userVerification':'preferred'},'timeout':60000,'attestation':'none'}}"}""" ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone( webauthn.sign_in_start("dummy@dummy.com", "https://example.com") ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = valid_response @@ -289,7 +289,7 @@ def test_sign_in_start_with_login_options(self): "mfa": False, }, }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -304,14 +304,14 @@ def test_sign_in_finish(self): self.assertRaises(AuthException, webauthn.sign_in_finish, "t01", "") self.assertRaises(AuthException, webauthn.sign_in_finish, "t01", None) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, webauthn.sign_in_finish, "t01", "response01" ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.cookies = {} @@ -333,7 +333,7 @@ def test_sign_in_finish(self): }, params=None, json={"transactionId": "t01", "response": "response01"}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -348,7 +348,7 @@ def test_sign_up_or_in_start(self): ) self.assertRaises(AuthException, webauthn.sign_up_or_in_start, "id", "") - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -361,13 +361,13 @@ def test_sign_up_or_in_start(self): valid_response = json.loads( """{"create": true, "transactionId": "2COHI3LIixYhf6Q7EECYt20zyMi", "options": "{'publicKey':{'challenge':'5GOywA7BHL1QceQOfxHKDrasuN8SkbbgXmB5ImVZ+QU=','rp':{'name':'comp6','id':'localhost'},'user':{'name”:”dummy@dummy.com','displayName”:”dummy”,”id':'VTJDT0hJNWlWOHJaZ3VURkpKMzV3bjEydHRkTw=='},'pubKeyCredParams':[{'type':'public-key','alg':-7},{'type':'public-key','alg':-35},{'type':'public-key','alg':-36},{'type':'public-key','alg':-257},{'type':'public-key','alg':-258},{'type':'public-key','alg':-259},{'type':'public-key','alg':-37},{'type':'public-key','alg':-38},{'type':'public-key','alg':-39},{'type':'public-key','alg':-8}],'authenticatorSelection':{'userVerification':'preferred'},'timeout':60000,'attestation':'none'}}"}""" ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone( webauthn.sign_up_or_in_start("dummy@dummy.com", "https://example.com") ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.json.return_value = valid_response @@ -386,7 +386,7 @@ def test_sign_up_or_in_start(self): "loginId": "id1", "origin": "https://example.com", }, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -418,7 +418,7 @@ def test_update_start(self): "https://example.com", ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, @@ -429,7 +429,7 @@ def test_update_start(self): ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = True self.assertIsNotNone( webauthn.update_start( @@ -437,7 +437,7 @@ def test_update_start(self): ) ) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: valid_response = json.loads("{}") my_mock_response = mock.Mock() my_mock_response.ok = True @@ -456,7 +456,7 @@ def test_update_start(self): }, params=None, json={"loginId": "dummy@dummy.com", "origin": "https://example.com"}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, ) @@ -471,14 +471,14 @@ def test_update_finish(self): self.assertRaises(AuthException, webauthn.update_finish, "t01", "") self.assertRaises(AuthException, webauthn.update_finish, "t01", None) - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: mock_post.return_value.ok = False self.assertRaises( AuthException, webauthn.update_finish, "t01", "response01" ) # Test success flow - with patch("requests.post") as mock_post: + with patch("httpx.post") as mock_post: my_mock_response = mock.Mock() my_mock_response.ok = True my_mock_response.cookies = {} @@ -498,7 +498,7 @@ def test_update_finish(self): }, params=None, json={"transactionId": "t01", "response": "response01"}, - allow_redirects=False, + follow_redirects=False, verify=True, timeout=DEFAULT_TIMEOUT_SECONDS, )