From 6702b4bcd12af1d670a4b73a7d9bedd68ccc5560 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Feb 2026 14:36:03 +0000 Subject: [PATCH 01/19] chore(internal): bump dependencies --- requirements-dev.lock | 20 ++++++++++---------- requirements.lock | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index c34becb..d03c1bf 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -12,14 +12,14 @@ -e file:. aiohappyeyeballs==2.6.1 # via aiohttp -aiohttp==3.13.2 +aiohttp==3.13.3 # via httpx-aiohttp # via imagekitio aiosignal==1.4.0 # via aiohttp annotated-types==0.7.0 # via pydantic -anyio==4.12.0 +anyio==4.12.1 # via httpx # via imagekitio argcomplete==3.6.3 @@ -32,7 +32,7 @@ attrs==25.4.0 # via standardwebhooks backports-asyncio-runner==1.2.0 # via pytest-asyncio -certifi==2025.11.12 +certifi==2026.1.4 # via httpcore # via httpx colorlog==6.10.1 @@ -65,7 +65,7 @@ httpx==0.28.1 # via imagekitio # via respx # via standardwebhooks -httpx-aiohttp==0.1.9 +httpx-aiohttp==0.1.12 # via imagekitio humanize==4.13.0 # via nox @@ -73,7 +73,7 @@ idna==3.11 # via anyio # via httpx # via yarl -importlib-metadata==8.7.0 +importlib-metadata==8.7.1 iniconfig==2.1.0 # via pytest markdown-it-py==3.0.0 @@ -86,14 +86,14 @@ multidict==6.7.0 mypy==1.17.0 mypy-extensions==1.1.0 # via mypy -nodeenv==1.9.1 +nodeenv==1.10.0 # via pyright nox==2025.11.12 packaging==25.0 # via dependency-groups # via nox # via pytest -pathspec==0.12.1 +pathspec==1.0.3 # via mypy platformdirs==4.4.0 # via virtualenv @@ -120,7 +120,7 @@ python-dateutil==2.9.0.post0 # via time-machine respx==0.22.0 rich==14.2.0 -ruff==0.14.7 +ruff==0.14.13 six==1.17.0 # via python-dateutil sniffio==1.3.1 @@ -128,7 +128,7 @@ sniffio==1.3.1 standardwebhooks==1.0.0 # via imagekitio time-machine==2.19.0 -tomli==2.3.0 +tomli==2.4.0 # via dependency-groups # via mypy # via nox @@ -152,7 +152,7 @@ typing-extensions==4.15.0 # via virtualenv typing-inspection==0.4.2 # via pydantic -virtualenv==20.35.4 +virtualenv==20.36.1 # via nox wrapt==2.0.1 # via deprecated diff --git a/requirements.lock b/requirements.lock index acc82f8..bea99bb 100644 --- a/requirements.lock +++ b/requirements.lock @@ -12,14 +12,14 @@ -e file:. aiohappyeyeballs==2.6.1 # via aiohttp -aiohttp==3.13.2 +aiohttp==3.13.3 # via httpx-aiohttp # via imagekitio aiosignal==1.4.0 # via aiohttp annotated-types==0.7.0 # via pydantic -anyio==4.12.0 +anyio==4.12.1 # via httpx # via imagekitio async-timeout==5.0.1 @@ -27,7 +27,7 @@ async-timeout==5.0.1 attrs==25.4.0 # via aiohttp # via standardwebhooks -certifi==2025.11.12 +certifi==2026.1.4 # via httpcore # via httpx deprecated==1.3.1 @@ -47,7 +47,7 @@ httpx==0.28.1 # via httpx-aiohttp # via imagekitio # via standardwebhooks -httpx-aiohttp==0.1.9 +httpx-aiohttp==0.1.12 # via imagekitio idna==3.11 # via anyio From 89d503b2a885f57edbbd6ffded3d1cddac61a53e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 11 Feb 2026 14:24:32 +0000 Subject: [PATCH 02/19] chore(internal): fix lint error on Python 3.14 --- src/imagekitio/_utils/_compat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imagekitio/_utils/_compat.py b/src/imagekitio/_utils/_compat.py index dd70323..2c70b29 100644 --- a/src/imagekitio/_utils/_compat.py +++ b/src/imagekitio/_utils/_compat.py @@ -26,7 +26,7 @@ def is_union(tp: Optional[Type[Any]]) -> bool: else: import types - return tp is Union or tp is types.UnionType + return tp is Union or tp is types.UnionType # type: ignore[comparison-overlap] def is_typeddict(tp: Type[Any]) -> bool: From 09cbb17e722d374477b13fd4045201ab75ddcc7e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 16:56:09 +0000 Subject: [PATCH 03/19] chore: format all `api.md` files --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7e7fc14..cebe3c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ format = { chain = [ # run formatting again to fix any inconsistencies when imports are stripped "format:ruff", ]} -"format:docs" = "python scripts/utils/ruffen-docs.py README.md api.md" +"format:docs" = "bash -c 'python scripts/utils/ruffen-docs.py README.md $(find . -type f -name api.md)'" "format:ruff" = "ruff format" "lint" = { chain = [ From 978ed611a909e2d616b322e23bfe3d14e8f256f4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Feb 2026 16:03:20 +0000 Subject: [PATCH 04/19] chore(internal): remove mock server code --- scripts/mock | 41 ----------------------------------------- scripts/test | 46 ---------------------------------------------- 2 files changed, 87 deletions(-) delete mode 100755 scripts/mock diff --git a/scripts/mock b/scripts/mock deleted file mode 100755 index 0b28f6e..0000000 --- a/scripts/mock +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash - -set -e - -cd "$(dirname "$0")/.." - -if [[ -n "$1" && "$1" != '--'* ]]; then - URL="$1" - shift -else - URL="$(grep 'openapi_spec_url' .stats.yml | cut -d' ' -f2)" -fi - -# Check if the URL is empty -if [ -z "$URL" ]; then - echo "Error: No OpenAPI spec path/url provided or found in .stats.yml" - exit 1 -fi - -echo "==> Starting mock server with URL ${URL}" - -# Run prism mock on the given spec -if [ "$1" == "--daemon" ]; then - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & - - # Wait for server to come online - echo -n "Waiting for server" - while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do - echo -n "." - sleep 0.1 - done - - if grep -q "✖ fatal" ".prism.log"; then - cat .prism.log - exit 1 - fi - - echo -else - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" -fi diff --git a/scripts/test b/scripts/test index dbeda2d..39729d0 100755 --- a/scripts/test +++ b/scripts/test @@ -4,53 +4,7 @@ set -e cd "$(dirname "$0")/.." -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[0;33m' -NC='\033[0m' # No Color -function prism_is_running() { - curl --silent "http://localhost:4010" >/dev/null 2>&1 -} - -kill_server_on_port() { - pids=$(lsof -t -i tcp:"$1" || echo "") - if [ "$pids" != "" ]; then - kill "$pids" - echo "Stopped $pids." - fi -} - -function is_overriding_api_base_url() { - [ -n "$TEST_API_BASE_URL" ] -} - -if ! is_overriding_api_base_url && ! prism_is_running ; then - # When we exit this script, make sure to kill the background mock server process - trap 'kill_server_on_port 4010' EXIT - - # Start the dev server - ./scripts/mock --daemon -fi - -if is_overriding_api_base_url ; then - echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}" - echo -elif ! prism_is_running ; then - echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server" - echo -e "running against your OpenAPI spec." - echo - echo -e "To run the server, pass in the path or url of your OpenAPI" - echo -e "spec to the prism command:" - echo - echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}" - echo - - exit 1 -else - echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}" - echo -fi export DEFER_PYDANTIC_BUILD=false From 54f47c663b48f2b6a88bf05ba26a0f2a139ee752 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Feb 2026 16:33:39 +0000 Subject: [PATCH 05/19] chore: update mock server docs --- CONTRIBUTING.md | 7 - tests/api_resources/accounts/test_origins.py | 332 +++++++++--------- .../accounts/test_url_endpoints.py | 80 ++--- tests/api_resources/accounts/test_usage.py | 12 +- tests/api_resources/beta/v2/test_files.py | 16 +- .../api_resources/cache/test_invalidation.py | 28 +- tests/api_resources/files/test_bulk.py | 48 +-- tests/api_resources/files/test_metadata.py | 28 +- tests/api_resources/files/test_versions.py | 64 ++-- tests/api_resources/folders/test_job.py | 16 +- tests/api_resources/test_assets.py | 16 +- .../test_custom_metadata_fields.py | 68 ++-- tests/api_resources/test_dummy.py | 16 +- tests/api_resources/test_files.py | 132 +++---- tests/api_resources/test_folders.py | 68 ++-- tests/api_resources/test_saved_extensions.py | 80 ++--- 16 files changed, 502 insertions(+), 509 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a6c5c7c..43b35bf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -85,13 +85,6 @@ $ pip install ./path-to-wheel-file.whl ## Running tests -Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. - -```sh -# you will need npm installed -$ npx prism mock path/to/your/openapi.yml -``` - ```sh $ ./scripts/test ``` diff --git a/tests/api_resources/accounts/test_origins.py b/tests/api_resources/accounts/test_origins.py index 95b5214..a4f6070 100644 --- a/tests/api_resources/accounts/test_origins.py +++ b/tests/api_resources/accounts/test_origins.py @@ -17,7 +17,7 @@ class TestOrigins: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create_overload_1(self, client: ImageKit) -> None: origin = client.accounts.origins.create( @@ -29,7 +29,7 @@ def test_method_create_overload_1(self, client: ImageKit) -> None: ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create_with_all_params_overload_1(self, client: ImageKit) -> None: origin = client.accounts.origins.create( @@ -44,7 +44,7 @@ def test_method_create_with_all_params_overload_1(self, client: ImageKit) -> Non ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_create_overload_1(self, client: ImageKit) -> None: response = client.accounts.origins.with_raw_response.create( @@ -60,7 +60,7 @@ def test_raw_response_create_overload_1(self, client: ImageKit) -> None: origin = response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_create_overload_1(self, client: ImageKit) -> None: with client.accounts.origins.with_streaming_response.create( @@ -78,7 +78,7 @@ def test_streaming_response_create_overload_1(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create_overload_2(self, client: ImageKit) -> None: origin = client.accounts.origins.create( @@ -91,7 +91,7 @@ def test_method_create_overload_2(self, client: ImageKit) -> None: ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create_with_all_params_overload_2(self, client: ImageKit) -> None: origin = client.accounts.origins.create( @@ -108,7 +108,7 @@ def test_method_create_with_all_params_overload_2(self, client: ImageKit) -> Non ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_create_overload_2(self, client: ImageKit) -> None: response = client.accounts.origins.with_raw_response.create( @@ -125,7 +125,7 @@ def test_raw_response_create_overload_2(self, client: ImageKit) -> None: origin = response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_create_overload_2(self, client: ImageKit) -> None: with client.accounts.origins.with_streaming_response.create( @@ -144,7 +144,7 @@ def test_streaming_response_create_overload_2(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create_overload_3(self, client: ImageKit) -> None: origin = client.accounts.origins.create( @@ -156,7 +156,7 @@ def test_method_create_overload_3(self, client: ImageKit) -> None: ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create_with_all_params_overload_3(self, client: ImageKit) -> None: origin = client.accounts.origins.create( @@ -171,7 +171,7 @@ def test_method_create_with_all_params_overload_3(self, client: ImageKit) -> Non ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_create_overload_3(self, client: ImageKit) -> None: response = client.accounts.origins.with_raw_response.create( @@ -187,7 +187,7 @@ def test_raw_response_create_overload_3(self, client: ImageKit) -> None: origin = response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_create_overload_3(self, client: ImageKit) -> None: with client.accounts.origins.with_streaming_response.create( @@ -205,7 +205,7 @@ def test_streaming_response_create_overload_3(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create_overload_4(self, client: ImageKit) -> None: origin = client.accounts.origins.create( @@ -215,7 +215,7 @@ def test_method_create_overload_4(self, client: ImageKit) -> None: ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create_with_all_params_overload_4(self, client: ImageKit) -> None: origin = client.accounts.origins.create( @@ -228,7 +228,7 @@ def test_method_create_with_all_params_overload_4(self, client: ImageKit) -> Non ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_create_overload_4(self, client: ImageKit) -> None: response = client.accounts.origins.with_raw_response.create( @@ -242,7 +242,7 @@ def test_raw_response_create_overload_4(self, client: ImageKit) -> None: origin = response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_create_overload_4(self, client: ImageKit) -> None: with client.accounts.origins.with_streaming_response.create( @@ -258,7 +258,7 @@ def test_streaming_response_create_overload_4(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create_overload_5(self, client: ImageKit) -> None: origin = client.accounts.origins.create( @@ -267,7 +267,7 @@ def test_method_create_overload_5(self, client: ImageKit) -> None: ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create_with_all_params_overload_5(self, client: ImageKit) -> None: origin = client.accounts.origins.create( @@ -278,7 +278,7 @@ def test_method_create_with_all_params_overload_5(self, client: ImageKit) -> Non ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_create_overload_5(self, client: ImageKit) -> None: response = client.accounts.origins.with_raw_response.create( @@ -291,7 +291,7 @@ def test_raw_response_create_overload_5(self, client: ImageKit) -> None: origin = response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_create_overload_5(self, client: ImageKit) -> None: with client.accounts.origins.with_streaming_response.create( @@ -306,7 +306,7 @@ def test_streaming_response_create_overload_5(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create_overload_6(self, client: ImageKit) -> None: origin = client.accounts.origins.create( @@ -318,7 +318,7 @@ def test_method_create_overload_6(self, client: ImageKit) -> None: ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create_with_all_params_overload_6(self, client: ImageKit) -> None: origin = client.accounts.origins.create( @@ -333,7 +333,7 @@ def test_method_create_with_all_params_overload_6(self, client: ImageKit) -> Non ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_create_overload_6(self, client: ImageKit) -> None: response = client.accounts.origins.with_raw_response.create( @@ -349,7 +349,7 @@ def test_raw_response_create_overload_6(self, client: ImageKit) -> None: origin = response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_create_overload_6(self, client: ImageKit) -> None: with client.accounts.origins.with_streaming_response.create( @@ -367,7 +367,7 @@ def test_streaming_response_create_overload_6(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create_overload_7(self, client: ImageKit) -> None: origin = client.accounts.origins.create( @@ -379,7 +379,7 @@ def test_method_create_overload_7(self, client: ImageKit) -> None: ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create_with_all_params_overload_7(self, client: ImageKit) -> None: origin = client.accounts.origins.create( @@ -394,7 +394,7 @@ def test_method_create_with_all_params_overload_7(self, client: ImageKit) -> Non ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_create_overload_7(self, client: ImageKit) -> None: response = client.accounts.origins.with_raw_response.create( @@ -410,7 +410,7 @@ def test_raw_response_create_overload_7(self, client: ImageKit) -> None: origin = response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_create_overload_7(self, client: ImageKit) -> None: with client.accounts.origins.with_streaming_response.create( @@ -428,7 +428,7 @@ def test_streaming_response_create_overload_7(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create_overload_8(self, client: ImageKit) -> None: origin = client.accounts.origins.create( @@ -442,7 +442,7 @@ def test_method_create_overload_8(self, client: ImageKit) -> None: ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create_with_all_params_overload_8(self, client: ImageKit) -> None: origin = client.accounts.origins.create( @@ -458,7 +458,7 @@ def test_method_create_with_all_params_overload_8(self, client: ImageKit) -> Non ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_create_overload_8(self, client: ImageKit) -> None: response = client.accounts.origins.with_raw_response.create( @@ -476,7 +476,7 @@ def test_raw_response_create_overload_8(self, client: ImageKit) -> None: origin = response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_create_overload_8(self, client: ImageKit) -> None: with client.accounts.origins.with_streaming_response.create( @@ -496,7 +496,7 @@ def test_streaming_response_create_overload_8(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_overload_1(self, client: ImageKit) -> None: origin = client.accounts.origins.update( @@ -509,7 +509,7 @@ def test_method_update_overload_1(self, client: ImageKit) -> None: ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_with_all_params_overload_1(self, client: ImageKit) -> None: origin = client.accounts.origins.update( @@ -525,7 +525,7 @@ def test_method_update_with_all_params_overload_1(self, client: ImageKit) -> Non ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_update_overload_1(self, client: ImageKit) -> None: response = client.accounts.origins.with_raw_response.update( @@ -542,7 +542,7 @@ def test_raw_response_update_overload_1(self, client: ImageKit) -> None: origin = response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_update_overload_1(self, client: ImageKit) -> None: with client.accounts.origins.with_streaming_response.update( @@ -561,7 +561,7 @@ def test_streaming_response_update_overload_1(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_update_overload_1(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -574,7 +574,7 @@ def test_path_params_update_overload_1(self, client: ImageKit) -> None: type="S3", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_overload_2(self, client: ImageKit) -> None: origin = client.accounts.origins.update( @@ -588,7 +588,7 @@ def test_method_update_overload_2(self, client: ImageKit) -> None: ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_with_all_params_overload_2(self, client: ImageKit) -> None: origin = client.accounts.origins.update( @@ -606,7 +606,7 @@ def test_method_update_with_all_params_overload_2(self, client: ImageKit) -> Non ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_update_overload_2(self, client: ImageKit) -> None: response = client.accounts.origins.with_raw_response.update( @@ -624,7 +624,7 @@ def test_raw_response_update_overload_2(self, client: ImageKit) -> None: origin = response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_update_overload_2(self, client: ImageKit) -> None: with client.accounts.origins.with_streaming_response.update( @@ -644,7 +644,7 @@ def test_streaming_response_update_overload_2(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_update_overload_2(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -658,7 +658,7 @@ def test_path_params_update_overload_2(self, client: ImageKit) -> None: type="S3_COMPATIBLE", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_overload_3(self, client: ImageKit) -> None: origin = client.accounts.origins.update( @@ -671,7 +671,7 @@ def test_method_update_overload_3(self, client: ImageKit) -> None: ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_with_all_params_overload_3(self, client: ImageKit) -> None: origin = client.accounts.origins.update( @@ -687,7 +687,7 @@ def test_method_update_with_all_params_overload_3(self, client: ImageKit) -> Non ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_update_overload_3(self, client: ImageKit) -> None: response = client.accounts.origins.with_raw_response.update( @@ -704,7 +704,7 @@ def test_raw_response_update_overload_3(self, client: ImageKit) -> None: origin = response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_update_overload_3(self, client: ImageKit) -> None: with client.accounts.origins.with_streaming_response.update( @@ -723,7 +723,7 @@ def test_streaming_response_update_overload_3(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_update_overload_3(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -736,7 +736,7 @@ def test_path_params_update_overload_3(self, client: ImageKit) -> None: type="CLOUDINARY_BACKUP", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_overload_4(self, client: ImageKit) -> None: origin = client.accounts.origins.update( @@ -747,7 +747,7 @@ def test_method_update_overload_4(self, client: ImageKit) -> None: ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_with_all_params_overload_4(self, client: ImageKit) -> None: origin = client.accounts.origins.update( @@ -761,7 +761,7 @@ def test_method_update_with_all_params_overload_4(self, client: ImageKit) -> Non ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_update_overload_4(self, client: ImageKit) -> None: response = client.accounts.origins.with_raw_response.update( @@ -776,7 +776,7 @@ def test_raw_response_update_overload_4(self, client: ImageKit) -> None: origin = response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_update_overload_4(self, client: ImageKit) -> None: with client.accounts.origins.with_streaming_response.update( @@ -793,7 +793,7 @@ def test_streaming_response_update_overload_4(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_update_overload_4(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -804,7 +804,7 @@ def test_path_params_update_overload_4(self, client: ImageKit) -> None: type="WEB_FOLDER", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_overload_5(self, client: ImageKit) -> None: origin = client.accounts.origins.update( @@ -814,7 +814,7 @@ def test_method_update_overload_5(self, client: ImageKit) -> None: ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_with_all_params_overload_5(self, client: ImageKit) -> None: origin = client.accounts.origins.update( @@ -826,7 +826,7 @@ def test_method_update_with_all_params_overload_5(self, client: ImageKit) -> Non ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_update_overload_5(self, client: ImageKit) -> None: response = client.accounts.origins.with_raw_response.update( @@ -840,7 +840,7 @@ def test_raw_response_update_overload_5(self, client: ImageKit) -> None: origin = response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_update_overload_5(self, client: ImageKit) -> None: with client.accounts.origins.with_streaming_response.update( @@ -856,7 +856,7 @@ def test_streaming_response_update_overload_5(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_update_overload_5(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -866,7 +866,7 @@ def test_path_params_update_overload_5(self, client: ImageKit) -> None: type="WEB_PROXY", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_overload_6(self, client: ImageKit) -> None: origin = client.accounts.origins.update( @@ -879,7 +879,7 @@ def test_method_update_overload_6(self, client: ImageKit) -> None: ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_with_all_params_overload_6(self, client: ImageKit) -> None: origin = client.accounts.origins.update( @@ -895,7 +895,7 @@ def test_method_update_with_all_params_overload_6(self, client: ImageKit) -> Non ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_update_overload_6(self, client: ImageKit) -> None: response = client.accounts.origins.with_raw_response.update( @@ -912,7 +912,7 @@ def test_raw_response_update_overload_6(self, client: ImageKit) -> None: origin = response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_update_overload_6(self, client: ImageKit) -> None: with client.accounts.origins.with_streaming_response.update( @@ -931,7 +931,7 @@ def test_streaming_response_update_overload_6(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_update_overload_6(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -944,7 +944,7 @@ def test_path_params_update_overload_6(self, client: ImageKit) -> None: type="GCS", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_overload_7(self, client: ImageKit) -> None: origin = client.accounts.origins.update( @@ -957,7 +957,7 @@ def test_method_update_overload_7(self, client: ImageKit) -> None: ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_with_all_params_overload_7(self, client: ImageKit) -> None: origin = client.accounts.origins.update( @@ -973,7 +973,7 @@ def test_method_update_with_all_params_overload_7(self, client: ImageKit) -> Non ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_update_overload_7(self, client: ImageKit) -> None: response = client.accounts.origins.with_raw_response.update( @@ -990,7 +990,7 @@ def test_raw_response_update_overload_7(self, client: ImageKit) -> None: origin = response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_update_overload_7(self, client: ImageKit) -> None: with client.accounts.origins.with_streaming_response.update( @@ -1009,7 +1009,7 @@ def test_streaming_response_update_overload_7(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_update_overload_7(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -1022,7 +1022,7 @@ def test_path_params_update_overload_7(self, client: ImageKit) -> None: type="AZURE_BLOB", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_overload_8(self, client: ImageKit) -> None: origin = client.accounts.origins.update( @@ -1037,7 +1037,7 @@ def test_method_update_overload_8(self, client: ImageKit) -> None: ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_with_all_params_overload_8(self, client: ImageKit) -> None: origin = client.accounts.origins.update( @@ -1054,7 +1054,7 @@ def test_method_update_with_all_params_overload_8(self, client: ImageKit) -> Non ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_update_overload_8(self, client: ImageKit) -> None: response = client.accounts.origins.with_raw_response.update( @@ -1073,7 +1073,7 @@ def test_raw_response_update_overload_8(self, client: ImageKit) -> None: origin = response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_update_overload_8(self, client: ImageKit) -> None: with client.accounts.origins.with_streaming_response.update( @@ -1094,7 +1094,7 @@ def test_streaming_response_update_overload_8(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_update_overload_8(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -1109,13 +1109,13 @@ def test_path_params_update_overload_8(self, client: ImageKit) -> None: username="integration-user", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_list(self, client: ImageKit) -> None: origin = client.accounts.origins.list() assert_matches_type(OriginListResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_list(self, client: ImageKit) -> None: response = client.accounts.origins.with_raw_response.list() @@ -1125,7 +1125,7 @@ def test_raw_response_list(self, client: ImageKit) -> None: origin = response.parse() assert_matches_type(OriginListResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_list(self, client: ImageKit) -> None: with client.accounts.origins.with_streaming_response.list() as response: @@ -1137,7 +1137,7 @@ def test_streaming_response_list(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_delete(self, client: ImageKit) -> None: origin = client.accounts.origins.delete( @@ -1145,7 +1145,7 @@ def test_method_delete(self, client: ImageKit) -> None: ) assert origin is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_delete(self, client: ImageKit) -> None: response = client.accounts.origins.with_raw_response.delete( @@ -1157,7 +1157,7 @@ def test_raw_response_delete(self, client: ImageKit) -> None: origin = response.parse() assert origin is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_delete(self, client: ImageKit) -> None: with client.accounts.origins.with_streaming_response.delete( @@ -1171,7 +1171,7 @@ def test_streaming_response_delete(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_delete(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -1179,7 +1179,7 @@ def test_path_params_delete(self, client: ImageKit) -> None: "", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_get(self, client: ImageKit) -> None: origin = client.accounts.origins.get( @@ -1187,7 +1187,7 @@ def test_method_get(self, client: ImageKit) -> None: ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_get(self, client: ImageKit) -> None: response = client.accounts.origins.with_raw_response.get( @@ -1199,7 +1199,7 @@ def test_raw_response_get(self, client: ImageKit) -> None: origin = response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_get(self, client: ImageKit) -> None: with client.accounts.origins.with_streaming_response.get( @@ -1213,7 +1213,7 @@ def test_streaming_response_get(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_get(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -1227,7 +1227,7 @@ class TestAsyncOrigins: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create_overload_1(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.create( @@ -1239,7 +1239,7 @@ async def test_method_create_overload_1(self, async_client: AsyncImageKit) -> No ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create_with_all_params_overload_1(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.create( @@ -1254,7 +1254,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_create_overload_1(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.origins.with_raw_response.create( @@ -1270,7 +1270,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncImageKit) origin = await response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_create_overload_1(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.origins.with_streaming_response.create( @@ -1288,7 +1288,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncIma assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create_overload_2(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.create( @@ -1301,7 +1301,7 @@ async def test_method_create_overload_2(self, async_client: AsyncImageKit) -> No ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create_with_all_params_overload_2(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.create( @@ -1318,7 +1318,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_create_overload_2(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.origins.with_raw_response.create( @@ -1335,7 +1335,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncImageKit) origin = await response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_create_overload_2(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.origins.with_streaming_response.create( @@ -1354,7 +1354,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncIma assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create_overload_3(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.create( @@ -1366,7 +1366,7 @@ async def test_method_create_overload_3(self, async_client: AsyncImageKit) -> No ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create_with_all_params_overload_3(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.create( @@ -1381,7 +1381,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_create_overload_3(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.origins.with_raw_response.create( @@ -1397,7 +1397,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncImageKit) origin = await response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_create_overload_3(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.origins.with_streaming_response.create( @@ -1415,7 +1415,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncIma assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create_overload_4(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.create( @@ -1425,7 +1425,7 @@ async def test_method_create_overload_4(self, async_client: AsyncImageKit) -> No ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create_with_all_params_overload_4(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.create( @@ -1438,7 +1438,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_create_overload_4(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.origins.with_raw_response.create( @@ -1452,7 +1452,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncImageKit) origin = await response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_create_overload_4(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.origins.with_streaming_response.create( @@ -1468,7 +1468,7 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncIma assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create_overload_5(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.create( @@ -1477,7 +1477,7 @@ async def test_method_create_overload_5(self, async_client: AsyncImageKit) -> No ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create_with_all_params_overload_5(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.create( @@ -1488,7 +1488,7 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_create_overload_5(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.origins.with_raw_response.create( @@ -1501,7 +1501,7 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncImageKit) origin = await response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_create_overload_5(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.origins.with_streaming_response.create( @@ -1516,7 +1516,7 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncIma assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create_overload_6(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.create( @@ -1528,7 +1528,7 @@ async def test_method_create_overload_6(self, async_client: AsyncImageKit) -> No ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create_with_all_params_overload_6(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.create( @@ -1543,7 +1543,7 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_create_overload_6(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.origins.with_raw_response.create( @@ -1559,7 +1559,7 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncImageKit) origin = await response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_create_overload_6(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.origins.with_streaming_response.create( @@ -1577,7 +1577,7 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncIma assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create_overload_7(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.create( @@ -1589,7 +1589,7 @@ async def test_method_create_overload_7(self, async_client: AsyncImageKit) -> No ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create_with_all_params_overload_7(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.create( @@ -1604,7 +1604,7 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_create_overload_7(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.origins.with_raw_response.create( @@ -1620,7 +1620,7 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncImageKit) origin = await response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_create_overload_7(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.origins.with_streaming_response.create( @@ -1638,7 +1638,7 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncIma assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create_overload_8(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.create( @@ -1652,7 +1652,7 @@ async def test_method_create_overload_8(self, async_client: AsyncImageKit) -> No ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create_with_all_params_overload_8(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.create( @@ -1668,7 +1668,7 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_create_overload_8(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.origins.with_raw_response.create( @@ -1686,7 +1686,7 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncImageKit) origin = await response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_create_overload_8(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.origins.with_streaming_response.create( @@ -1706,7 +1706,7 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncIma assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_overload_1(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.update( @@ -1719,7 +1719,7 @@ async def test_method_update_overload_1(self, async_client: AsyncImageKit) -> No ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.update( @@ -1735,7 +1735,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.origins.with_raw_response.update( @@ -1752,7 +1752,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncImageKit) origin = await response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.origins.with_streaming_response.update( @@ -1771,7 +1771,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncIma assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_update_overload_1(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -1784,7 +1784,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncImageKit) type="S3", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_overload_2(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.update( @@ -1798,7 +1798,7 @@ async def test_method_update_overload_2(self, async_client: AsyncImageKit) -> No ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.update( @@ -1816,7 +1816,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.origins.with_raw_response.update( @@ -1834,7 +1834,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncImageKit) origin = await response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.origins.with_streaming_response.update( @@ -1854,7 +1854,7 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncIma assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_update_overload_2(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -1868,7 +1868,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncImageKit) type="S3_COMPATIBLE", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_overload_3(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.update( @@ -1881,7 +1881,7 @@ async def test_method_update_overload_3(self, async_client: AsyncImageKit) -> No ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_with_all_params_overload_3(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.update( @@ -1897,7 +1897,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_update_overload_3(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.origins.with_raw_response.update( @@ -1914,7 +1914,7 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncImageKit) origin = await response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_update_overload_3(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.origins.with_streaming_response.update( @@ -1933,7 +1933,7 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncIma assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_update_overload_3(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -1946,7 +1946,7 @@ async def test_path_params_update_overload_3(self, async_client: AsyncImageKit) type="CLOUDINARY_BACKUP", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_overload_4(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.update( @@ -1957,7 +1957,7 @@ async def test_method_update_overload_4(self, async_client: AsyncImageKit) -> No ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_with_all_params_overload_4(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.update( @@ -1971,7 +1971,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_update_overload_4(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.origins.with_raw_response.update( @@ -1986,7 +1986,7 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncImageKit) origin = await response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_update_overload_4(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.origins.with_streaming_response.update( @@ -2003,7 +2003,7 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncIma assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_update_overload_4(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -2014,7 +2014,7 @@ async def test_path_params_update_overload_4(self, async_client: AsyncImageKit) type="WEB_FOLDER", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_overload_5(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.update( @@ -2024,7 +2024,7 @@ async def test_method_update_overload_5(self, async_client: AsyncImageKit) -> No ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_with_all_params_overload_5(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.update( @@ -2036,7 +2036,7 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_update_overload_5(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.origins.with_raw_response.update( @@ -2050,7 +2050,7 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncImageKit) origin = await response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_update_overload_5(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.origins.with_streaming_response.update( @@ -2066,7 +2066,7 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncIma assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_update_overload_5(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -2076,7 +2076,7 @@ async def test_path_params_update_overload_5(self, async_client: AsyncImageKit) type="WEB_PROXY", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_overload_6(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.update( @@ -2089,7 +2089,7 @@ async def test_method_update_overload_6(self, async_client: AsyncImageKit) -> No ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_with_all_params_overload_6(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.update( @@ -2105,7 +2105,7 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_update_overload_6(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.origins.with_raw_response.update( @@ -2122,7 +2122,7 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncImageKit) origin = await response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_update_overload_6(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.origins.with_streaming_response.update( @@ -2141,7 +2141,7 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncIma assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_update_overload_6(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -2154,7 +2154,7 @@ async def test_path_params_update_overload_6(self, async_client: AsyncImageKit) type="GCS", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_overload_7(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.update( @@ -2167,7 +2167,7 @@ async def test_method_update_overload_7(self, async_client: AsyncImageKit) -> No ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_with_all_params_overload_7(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.update( @@ -2183,7 +2183,7 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_update_overload_7(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.origins.with_raw_response.update( @@ -2200,7 +2200,7 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncImageKit) origin = await response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_update_overload_7(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.origins.with_streaming_response.update( @@ -2219,7 +2219,7 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncIma assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_update_overload_7(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -2232,7 +2232,7 @@ async def test_path_params_update_overload_7(self, async_client: AsyncImageKit) type="AZURE_BLOB", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_overload_8(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.update( @@ -2247,7 +2247,7 @@ async def test_method_update_overload_8(self, async_client: AsyncImageKit) -> No ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_with_all_params_overload_8(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.update( @@ -2264,7 +2264,7 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_update_overload_8(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.origins.with_raw_response.update( @@ -2283,7 +2283,7 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncImageKit) origin = await response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_update_overload_8(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.origins.with_streaming_response.update( @@ -2304,7 +2304,7 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncIma assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_update_overload_8(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -2319,13 +2319,13 @@ async def test_path_params_update_overload_8(self, async_client: AsyncImageKit) username="integration-user", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.list() assert_matches_type(OriginListResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.origins.with_raw_response.list() @@ -2335,7 +2335,7 @@ async def test_raw_response_list(self, async_client: AsyncImageKit) -> None: origin = await response.parse() assert_matches_type(OriginListResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.origins.with_streaming_response.list() as response: @@ -2347,7 +2347,7 @@ async def test_streaming_response_list(self, async_client: AsyncImageKit) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.delete( @@ -2355,7 +2355,7 @@ async def test_method_delete(self, async_client: AsyncImageKit) -> None: ) assert origin is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.origins.with_raw_response.delete( @@ -2367,7 +2367,7 @@ async def test_raw_response_delete(self, async_client: AsyncImageKit) -> None: origin = await response.parse() assert origin is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.origins.with_streaming_response.delete( @@ -2381,7 +2381,7 @@ async def test_streaming_response_delete(self, async_client: AsyncImageKit) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_delete(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -2389,7 +2389,7 @@ async def test_path_params_delete(self, async_client: AsyncImageKit) -> None: "", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_get(self, async_client: AsyncImageKit) -> None: origin = await async_client.accounts.origins.get( @@ -2397,7 +2397,7 @@ async def test_method_get(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_get(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.origins.with_raw_response.get( @@ -2409,7 +2409,7 @@ async def test_raw_response_get(self, async_client: AsyncImageKit) -> None: origin = await response.parse() assert_matches_type(OriginResponse, origin, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_get(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.origins.with_streaming_response.get( @@ -2423,7 +2423,7 @@ async def test_streaming_response_get(self, async_client: AsyncImageKit) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_get(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): diff --git a/tests/api_resources/accounts/test_url_endpoints.py b/tests/api_resources/accounts/test_url_endpoints.py index 954f630..551b2ea 100644 --- a/tests/api_resources/accounts/test_url_endpoints.py +++ b/tests/api_resources/accounts/test_url_endpoints.py @@ -20,7 +20,7 @@ class TestURLEndpoints: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create(self, client: ImageKit) -> None: url_endpoint = client.accounts.url_endpoints.create( @@ -28,7 +28,7 @@ def test_method_create(self, client: ImageKit) -> None: ) assert_matches_type(URLEndpointResponse, url_endpoint, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create_with_all_params(self, client: ImageKit) -> None: url_endpoint = client.accounts.url_endpoints.create( @@ -42,7 +42,7 @@ def test_method_create_with_all_params(self, client: ImageKit) -> None: ) assert_matches_type(URLEndpointResponse, url_endpoint, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_create(self, client: ImageKit) -> None: response = client.accounts.url_endpoints.with_raw_response.create( @@ -54,7 +54,7 @@ def test_raw_response_create(self, client: ImageKit) -> None: url_endpoint = response.parse() assert_matches_type(URLEndpointResponse, url_endpoint, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_create(self, client: ImageKit) -> None: with client.accounts.url_endpoints.with_streaming_response.create( @@ -68,7 +68,7 @@ def test_streaming_response_create(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update(self, client: ImageKit) -> None: url_endpoint = client.accounts.url_endpoints.update( @@ -77,7 +77,7 @@ def test_method_update(self, client: ImageKit) -> None: ) assert_matches_type(URLEndpointResponse, url_endpoint, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_with_all_params(self, client: ImageKit) -> None: url_endpoint = client.accounts.url_endpoints.update( @@ -92,7 +92,7 @@ def test_method_update_with_all_params(self, client: ImageKit) -> None: ) assert_matches_type(URLEndpointResponse, url_endpoint, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_update(self, client: ImageKit) -> None: response = client.accounts.url_endpoints.with_raw_response.update( @@ -105,7 +105,7 @@ def test_raw_response_update(self, client: ImageKit) -> None: url_endpoint = response.parse() assert_matches_type(URLEndpointResponse, url_endpoint, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_update(self, client: ImageKit) -> None: with client.accounts.url_endpoints.with_streaming_response.update( @@ -120,7 +120,7 @@ def test_streaming_response_update(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_update(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -129,13 +129,13 @@ def test_path_params_update(self, client: ImageKit) -> None: description="My custom URL endpoint", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_list(self, client: ImageKit) -> None: url_endpoint = client.accounts.url_endpoints.list() assert_matches_type(URLEndpointListResponse, url_endpoint, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_list(self, client: ImageKit) -> None: response = client.accounts.url_endpoints.with_raw_response.list() @@ -145,7 +145,7 @@ def test_raw_response_list(self, client: ImageKit) -> None: url_endpoint = response.parse() assert_matches_type(URLEndpointListResponse, url_endpoint, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_list(self, client: ImageKit) -> None: with client.accounts.url_endpoints.with_streaming_response.list() as response: @@ -157,7 +157,7 @@ def test_streaming_response_list(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_delete(self, client: ImageKit) -> None: url_endpoint = client.accounts.url_endpoints.delete( @@ -165,7 +165,7 @@ def test_method_delete(self, client: ImageKit) -> None: ) assert url_endpoint is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_delete(self, client: ImageKit) -> None: response = client.accounts.url_endpoints.with_raw_response.delete( @@ -177,7 +177,7 @@ def test_raw_response_delete(self, client: ImageKit) -> None: url_endpoint = response.parse() assert url_endpoint is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_delete(self, client: ImageKit) -> None: with client.accounts.url_endpoints.with_streaming_response.delete( @@ -191,7 +191,7 @@ def test_streaming_response_delete(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_delete(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -199,7 +199,7 @@ def test_path_params_delete(self, client: ImageKit) -> None: "", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_get(self, client: ImageKit) -> None: url_endpoint = client.accounts.url_endpoints.get( @@ -207,7 +207,7 @@ def test_method_get(self, client: ImageKit) -> None: ) assert_matches_type(URLEndpointResponse, url_endpoint, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_get(self, client: ImageKit) -> None: response = client.accounts.url_endpoints.with_raw_response.get( @@ -219,7 +219,7 @@ def test_raw_response_get(self, client: ImageKit) -> None: url_endpoint = response.parse() assert_matches_type(URLEndpointResponse, url_endpoint, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_get(self, client: ImageKit) -> None: with client.accounts.url_endpoints.with_streaming_response.get( @@ -233,7 +233,7 @@ def test_streaming_response_get(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_get(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -247,7 +247,7 @@ class TestAsyncURLEndpoints: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncImageKit) -> None: url_endpoint = await async_client.accounts.url_endpoints.create( @@ -255,7 +255,7 @@ async def test_method_create(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(URLEndpointResponse, url_endpoint, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncImageKit) -> None: url_endpoint = await async_client.accounts.url_endpoints.create( @@ -269,7 +269,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncImageKit) ) assert_matches_type(URLEndpointResponse, url_endpoint, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.url_endpoints.with_raw_response.create( @@ -281,7 +281,7 @@ async def test_raw_response_create(self, async_client: AsyncImageKit) -> None: url_endpoint = await response.parse() assert_matches_type(URLEndpointResponse, url_endpoint, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.url_endpoints.with_streaming_response.create( @@ -295,7 +295,7 @@ async def test_streaming_response_create(self, async_client: AsyncImageKit) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncImageKit) -> None: url_endpoint = await async_client.accounts.url_endpoints.update( @@ -304,7 +304,7 @@ async def test_method_update(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(URLEndpointResponse, url_endpoint, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncImageKit) -> None: url_endpoint = await async_client.accounts.url_endpoints.update( @@ -319,7 +319,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncImageKit) ) assert_matches_type(URLEndpointResponse, url_endpoint, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.url_endpoints.with_raw_response.update( @@ -332,7 +332,7 @@ async def test_raw_response_update(self, async_client: AsyncImageKit) -> None: url_endpoint = await response.parse() assert_matches_type(URLEndpointResponse, url_endpoint, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.url_endpoints.with_streaming_response.update( @@ -347,7 +347,7 @@ async def test_streaming_response_update(self, async_client: AsyncImageKit) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_update(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -356,13 +356,13 @@ async def test_path_params_update(self, async_client: AsyncImageKit) -> None: description="My custom URL endpoint", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncImageKit) -> None: url_endpoint = await async_client.accounts.url_endpoints.list() assert_matches_type(URLEndpointListResponse, url_endpoint, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.url_endpoints.with_raw_response.list() @@ -372,7 +372,7 @@ async def test_raw_response_list(self, async_client: AsyncImageKit) -> None: url_endpoint = await response.parse() assert_matches_type(URLEndpointListResponse, url_endpoint, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.url_endpoints.with_streaming_response.list() as response: @@ -384,7 +384,7 @@ async def test_streaming_response_list(self, async_client: AsyncImageKit) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncImageKit) -> None: url_endpoint = await async_client.accounts.url_endpoints.delete( @@ -392,7 +392,7 @@ async def test_method_delete(self, async_client: AsyncImageKit) -> None: ) assert url_endpoint is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.url_endpoints.with_raw_response.delete( @@ -404,7 +404,7 @@ async def test_raw_response_delete(self, async_client: AsyncImageKit) -> None: url_endpoint = await response.parse() assert url_endpoint is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.url_endpoints.with_streaming_response.delete( @@ -418,7 +418,7 @@ async def test_streaming_response_delete(self, async_client: AsyncImageKit) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_delete(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -426,7 +426,7 @@ async def test_path_params_delete(self, async_client: AsyncImageKit) -> None: "", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_get(self, async_client: AsyncImageKit) -> None: url_endpoint = await async_client.accounts.url_endpoints.get( @@ -434,7 +434,7 @@ async def test_method_get(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(URLEndpointResponse, url_endpoint, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_get(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.url_endpoints.with_raw_response.get( @@ -446,7 +446,7 @@ async def test_raw_response_get(self, async_client: AsyncImageKit) -> None: url_endpoint = await response.parse() assert_matches_type(URLEndpointResponse, url_endpoint, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_get(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.url_endpoints.with_streaming_response.get( @@ -460,7 +460,7 @@ async def test_streaming_response_get(self, async_client: AsyncImageKit) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_get(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): diff --git a/tests/api_resources/accounts/test_usage.py b/tests/api_resources/accounts/test_usage.py index f477693..5c2a311 100644 --- a/tests/api_resources/accounts/test_usage.py +++ b/tests/api_resources/accounts/test_usage.py @@ -18,7 +18,7 @@ class TestUsage: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_get(self, client: ImageKit) -> None: usage = client.accounts.usage.get( @@ -27,7 +27,7 @@ def test_method_get(self, client: ImageKit) -> None: ) assert_matches_type(UsageGetResponse, usage, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_get(self, client: ImageKit) -> None: response = client.accounts.usage.with_raw_response.get( @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: ImageKit) -> None: usage = response.parse() assert_matches_type(UsageGetResponse, usage, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_get(self, client: ImageKit) -> None: with client.accounts.usage.with_streaming_response.get( @@ -61,7 +61,7 @@ class TestAsyncUsage: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_get(self, async_client: AsyncImageKit) -> None: usage = await async_client.accounts.usage.get( @@ -70,7 +70,7 @@ async def test_method_get(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(UsageGetResponse, usage, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_get(self, async_client: AsyncImageKit) -> None: response = await async_client.accounts.usage.with_raw_response.get( @@ -83,7 +83,7 @@ async def test_raw_response_get(self, async_client: AsyncImageKit) -> None: usage = await response.parse() assert_matches_type(UsageGetResponse, usage, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_get(self, async_client: AsyncImageKit) -> None: async with async_client.accounts.usage.with_streaming_response.get( diff --git a/tests/api_resources/beta/v2/test_files.py b/tests/api_resources/beta/v2/test_files.py index fdeae5a..619f283 100644 --- a/tests/api_resources/beta/v2/test_files.py +++ b/tests/api_resources/beta/v2/test_files.py @@ -17,7 +17,7 @@ class TestFiles: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_upload(self, client: ImageKit) -> None: file = client.beta.v2.files.upload( @@ -26,7 +26,7 @@ def test_method_upload(self, client: ImageKit) -> None: ) assert_matches_type(FileUploadResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_upload_with_all_params(self, client: ImageKit) -> None: file = client.beta.v2.files.upload( @@ -138,7 +138,7 @@ def test_method_upload_with_all_params(self, client: ImageKit) -> None: ) assert_matches_type(FileUploadResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_upload(self, client: ImageKit) -> None: response = client.beta.v2.files.with_raw_response.upload( @@ -151,7 +151,7 @@ def test_raw_response_upload(self, client: ImageKit) -> None: file = response.parse() assert_matches_type(FileUploadResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_upload(self, client: ImageKit) -> None: with client.beta.v2.files.with_streaming_response.upload( @@ -172,7 +172,7 @@ class TestAsyncFiles: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_upload(self, async_client: AsyncImageKit) -> None: file = await async_client.beta.v2.files.upload( @@ -181,7 +181,7 @@ async def test_method_upload(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(FileUploadResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_upload_with_all_params(self, async_client: AsyncImageKit) -> None: file = await async_client.beta.v2.files.upload( @@ -293,7 +293,7 @@ async def test_method_upload_with_all_params(self, async_client: AsyncImageKit) ) assert_matches_type(FileUploadResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_upload(self, async_client: AsyncImageKit) -> None: response = await async_client.beta.v2.files.with_raw_response.upload( @@ -306,7 +306,7 @@ async def test_raw_response_upload(self, async_client: AsyncImageKit) -> None: file = await response.parse() assert_matches_type(FileUploadResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_upload(self, async_client: AsyncImageKit) -> None: async with async_client.beta.v2.files.with_streaming_response.upload( diff --git a/tests/api_resources/cache/test_invalidation.py b/tests/api_resources/cache/test_invalidation.py index e68c2a6..6d32555 100644 --- a/tests/api_resources/cache/test_invalidation.py +++ b/tests/api_resources/cache/test_invalidation.py @@ -17,7 +17,7 @@ class TestInvalidation: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create(self, client: ImageKit) -> None: invalidation = client.cache.invalidation.create( @@ -25,7 +25,7 @@ def test_method_create(self, client: ImageKit) -> None: ) assert_matches_type(InvalidationCreateResponse, invalidation, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_create(self, client: ImageKit) -> None: response = client.cache.invalidation.with_raw_response.create( @@ -37,7 +37,7 @@ def test_raw_response_create(self, client: ImageKit) -> None: invalidation = response.parse() assert_matches_type(InvalidationCreateResponse, invalidation, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_create(self, client: ImageKit) -> None: with client.cache.invalidation.with_streaming_response.create( @@ -51,7 +51,7 @@ def test_streaming_response_create(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_get(self, client: ImageKit) -> None: invalidation = client.cache.invalidation.get( @@ -59,7 +59,7 @@ def test_method_get(self, client: ImageKit) -> None: ) assert_matches_type(InvalidationGetResponse, invalidation, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_get(self, client: ImageKit) -> None: response = client.cache.invalidation.with_raw_response.get( @@ -71,7 +71,7 @@ def test_raw_response_get(self, client: ImageKit) -> None: invalidation = response.parse() assert_matches_type(InvalidationGetResponse, invalidation, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_get(self, client: ImageKit) -> None: with client.cache.invalidation.with_streaming_response.get( @@ -85,7 +85,7 @@ def test_streaming_response_get(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_get(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_id` but received ''"): @@ -99,7 +99,7 @@ class TestAsyncInvalidation: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncImageKit) -> None: invalidation = await async_client.cache.invalidation.create( @@ -107,7 +107,7 @@ async def test_method_create(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(InvalidationCreateResponse, invalidation, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncImageKit) -> None: response = await async_client.cache.invalidation.with_raw_response.create( @@ -119,7 +119,7 @@ async def test_raw_response_create(self, async_client: AsyncImageKit) -> None: invalidation = await response.parse() assert_matches_type(InvalidationCreateResponse, invalidation, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncImageKit) -> None: async with async_client.cache.invalidation.with_streaming_response.create( @@ -133,7 +133,7 @@ async def test_streaming_response_create(self, async_client: AsyncImageKit) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_get(self, async_client: AsyncImageKit) -> None: invalidation = await async_client.cache.invalidation.get( @@ -141,7 +141,7 @@ async def test_method_get(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(InvalidationGetResponse, invalidation, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_get(self, async_client: AsyncImageKit) -> None: response = await async_client.cache.invalidation.with_raw_response.get( @@ -153,7 +153,7 @@ async def test_raw_response_get(self, async_client: AsyncImageKit) -> None: invalidation = await response.parse() assert_matches_type(InvalidationGetResponse, invalidation, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_get(self, async_client: AsyncImageKit) -> None: async with async_client.cache.invalidation.with_streaming_response.get( @@ -167,7 +167,7 @@ async def test_streaming_response_get(self, async_client: AsyncImageKit) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_get(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_id` but received ''"): diff --git a/tests/api_resources/files/test_bulk.py b/tests/api_resources/files/test_bulk.py index 150b5b2..4d116cb 100644 --- a/tests/api_resources/files/test_bulk.py +++ b/tests/api_resources/files/test_bulk.py @@ -22,7 +22,7 @@ class TestBulk: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_delete(self, client: ImageKit) -> None: bulk = client.files.bulk.delete( @@ -30,7 +30,7 @@ def test_method_delete(self, client: ImageKit) -> None: ) assert_matches_type(BulkDeleteResponse, bulk, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_delete(self, client: ImageKit) -> None: response = client.files.bulk.with_raw_response.delete( @@ -42,7 +42,7 @@ def test_raw_response_delete(self, client: ImageKit) -> None: bulk = response.parse() assert_matches_type(BulkDeleteResponse, bulk, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_delete(self, client: ImageKit) -> None: with client.files.bulk.with_streaming_response.delete( @@ -56,7 +56,7 @@ def test_streaming_response_delete(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_add_tags(self, client: ImageKit) -> None: bulk = client.files.bulk.add_tags( @@ -65,7 +65,7 @@ def test_method_add_tags(self, client: ImageKit) -> None: ) assert_matches_type(BulkAddTagsResponse, bulk, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_add_tags(self, client: ImageKit) -> None: response = client.files.bulk.with_raw_response.add_tags( @@ -78,7 +78,7 @@ def test_raw_response_add_tags(self, client: ImageKit) -> None: bulk = response.parse() assert_matches_type(BulkAddTagsResponse, bulk, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_add_tags(self, client: ImageKit) -> None: with client.files.bulk.with_streaming_response.add_tags( @@ -93,7 +93,7 @@ def test_streaming_response_add_tags(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_remove_ai_tags(self, client: ImageKit) -> None: bulk = client.files.bulk.remove_ai_tags( @@ -102,7 +102,7 @@ def test_method_remove_ai_tags(self, client: ImageKit) -> None: ) assert_matches_type(BulkRemoveAITagsResponse, bulk, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_remove_ai_tags(self, client: ImageKit) -> None: response = client.files.bulk.with_raw_response.remove_ai_tags( @@ -115,7 +115,7 @@ def test_raw_response_remove_ai_tags(self, client: ImageKit) -> None: bulk = response.parse() assert_matches_type(BulkRemoveAITagsResponse, bulk, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_remove_ai_tags(self, client: ImageKit) -> None: with client.files.bulk.with_streaming_response.remove_ai_tags( @@ -130,7 +130,7 @@ def test_streaming_response_remove_ai_tags(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_remove_tags(self, client: ImageKit) -> None: bulk = client.files.bulk.remove_tags( @@ -139,7 +139,7 @@ def test_method_remove_tags(self, client: ImageKit) -> None: ) assert_matches_type(BulkRemoveTagsResponse, bulk, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_remove_tags(self, client: ImageKit) -> None: response = client.files.bulk.with_raw_response.remove_tags( @@ -152,7 +152,7 @@ def test_raw_response_remove_tags(self, client: ImageKit) -> None: bulk = response.parse() assert_matches_type(BulkRemoveTagsResponse, bulk, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_remove_tags(self, client: ImageKit) -> None: with client.files.bulk.with_streaming_response.remove_tags( @@ -173,7 +173,7 @@ class TestAsyncBulk: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncImageKit) -> None: bulk = await async_client.files.bulk.delete( @@ -181,7 +181,7 @@ async def test_method_delete(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(BulkDeleteResponse, bulk, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncImageKit) -> None: response = await async_client.files.bulk.with_raw_response.delete( @@ -193,7 +193,7 @@ async def test_raw_response_delete(self, async_client: AsyncImageKit) -> None: bulk = await response.parse() assert_matches_type(BulkDeleteResponse, bulk, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncImageKit) -> None: async with async_client.files.bulk.with_streaming_response.delete( @@ -207,7 +207,7 @@ async def test_streaming_response_delete(self, async_client: AsyncImageKit) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_add_tags(self, async_client: AsyncImageKit) -> None: bulk = await async_client.files.bulk.add_tags( @@ -216,7 +216,7 @@ async def test_method_add_tags(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(BulkAddTagsResponse, bulk, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_add_tags(self, async_client: AsyncImageKit) -> None: response = await async_client.files.bulk.with_raw_response.add_tags( @@ -229,7 +229,7 @@ async def test_raw_response_add_tags(self, async_client: AsyncImageKit) -> None: bulk = await response.parse() assert_matches_type(BulkAddTagsResponse, bulk, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_add_tags(self, async_client: AsyncImageKit) -> None: async with async_client.files.bulk.with_streaming_response.add_tags( @@ -244,7 +244,7 @@ async def test_streaming_response_add_tags(self, async_client: AsyncImageKit) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_remove_ai_tags(self, async_client: AsyncImageKit) -> None: bulk = await async_client.files.bulk.remove_ai_tags( @@ -253,7 +253,7 @@ async def test_method_remove_ai_tags(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(BulkRemoveAITagsResponse, bulk, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_remove_ai_tags(self, async_client: AsyncImageKit) -> None: response = await async_client.files.bulk.with_raw_response.remove_ai_tags( @@ -266,7 +266,7 @@ async def test_raw_response_remove_ai_tags(self, async_client: AsyncImageKit) -> bulk = await response.parse() assert_matches_type(BulkRemoveAITagsResponse, bulk, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_remove_ai_tags(self, async_client: AsyncImageKit) -> None: async with async_client.files.bulk.with_streaming_response.remove_ai_tags( @@ -281,7 +281,7 @@ async def test_streaming_response_remove_ai_tags(self, async_client: AsyncImageK assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_remove_tags(self, async_client: AsyncImageKit) -> None: bulk = await async_client.files.bulk.remove_tags( @@ -290,7 +290,7 @@ async def test_method_remove_tags(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(BulkRemoveTagsResponse, bulk, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_remove_tags(self, async_client: AsyncImageKit) -> None: response = await async_client.files.bulk.with_raw_response.remove_tags( @@ -303,7 +303,7 @@ async def test_raw_response_remove_tags(self, async_client: AsyncImageKit) -> No bulk = await response.parse() assert_matches_type(BulkRemoveTagsResponse, bulk, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_remove_tags(self, async_client: AsyncImageKit) -> None: async with async_client.files.bulk.with_streaming_response.remove_tags( diff --git a/tests/api_resources/files/test_metadata.py b/tests/api_resources/files/test_metadata.py index eb4007c..ee7b8d3 100644 --- a/tests/api_resources/files/test_metadata.py +++ b/tests/api_resources/files/test_metadata.py @@ -17,7 +17,7 @@ class TestMetadata: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_get(self, client: ImageKit) -> None: metadata = client.files.metadata.get( @@ -25,7 +25,7 @@ def test_method_get(self, client: ImageKit) -> None: ) assert_matches_type(Metadata, metadata, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_get(self, client: ImageKit) -> None: response = client.files.metadata.with_raw_response.get( @@ -37,7 +37,7 @@ def test_raw_response_get(self, client: ImageKit) -> None: metadata = response.parse() assert_matches_type(Metadata, metadata, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_get(self, client: ImageKit) -> None: with client.files.metadata.with_streaming_response.get( @@ -51,7 +51,7 @@ def test_streaming_response_get(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_get(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): @@ -59,7 +59,7 @@ def test_path_params_get(self, client: ImageKit) -> None: "", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_get_from_url(self, client: ImageKit) -> None: metadata = client.files.metadata.get_from_url( @@ -67,7 +67,7 @@ def test_method_get_from_url(self, client: ImageKit) -> None: ) assert_matches_type(Metadata, metadata, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_get_from_url(self, client: ImageKit) -> None: response = client.files.metadata.with_raw_response.get_from_url( @@ -79,7 +79,7 @@ def test_raw_response_get_from_url(self, client: ImageKit) -> None: metadata = response.parse() assert_matches_type(Metadata, metadata, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_get_from_url(self, client: ImageKit) -> None: with client.files.metadata.with_streaming_response.get_from_url( @@ -99,7 +99,7 @@ class TestAsyncMetadata: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_get(self, async_client: AsyncImageKit) -> None: metadata = await async_client.files.metadata.get( @@ -107,7 +107,7 @@ async def test_method_get(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(Metadata, metadata, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_get(self, async_client: AsyncImageKit) -> None: response = await async_client.files.metadata.with_raw_response.get( @@ -119,7 +119,7 @@ async def test_raw_response_get(self, async_client: AsyncImageKit) -> None: metadata = await response.parse() assert_matches_type(Metadata, metadata, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_get(self, async_client: AsyncImageKit) -> None: async with async_client.files.metadata.with_streaming_response.get( @@ -133,7 +133,7 @@ async def test_streaming_response_get(self, async_client: AsyncImageKit) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_get(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): @@ -141,7 +141,7 @@ async def test_path_params_get(self, async_client: AsyncImageKit) -> None: "", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_get_from_url(self, async_client: AsyncImageKit) -> None: metadata = await async_client.files.metadata.get_from_url( @@ -149,7 +149,7 @@ async def test_method_get_from_url(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(Metadata, metadata, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_get_from_url(self, async_client: AsyncImageKit) -> None: response = await async_client.files.metadata.with_raw_response.get_from_url( @@ -161,7 +161,7 @@ async def test_raw_response_get_from_url(self, async_client: AsyncImageKit) -> N metadata = await response.parse() assert_matches_type(Metadata, metadata, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_get_from_url(self, async_client: AsyncImageKit) -> None: async with async_client.files.metadata.with_streaming_response.get_from_url( diff --git a/tests/api_resources/files/test_versions.py b/tests/api_resources/files/test_versions.py index 13f3c51..e293900 100644 --- a/tests/api_resources/files/test_versions.py +++ b/tests/api_resources/files/test_versions.py @@ -18,7 +18,7 @@ class TestVersions: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_list(self, client: ImageKit) -> None: version = client.files.versions.list( @@ -26,7 +26,7 @@ def test_method_list(self, client: ImageKit) -> None: ) assert_matches_type(VersionListResponse, version, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_list(self, client: ImageKit) -> None: response = client.files.versions.with_raw_response.list( @@ -38,7 +38,7 @@ def test_raw_response_list(self, client: ImageKit) -> None: version = response.parse() assert_matches_type(VersionListResponse, version, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_list(self, client: ImageKit) -> None: with client.files.versions.with_streaming_response.list( @@ -52,7 +52,7 @@ def test_streaming_response_list(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_list(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): @@ -60,7 +60,7 @@ def test_path_params_list(self, client: ImageKit) -> None: "", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_delete(self, client: ImageKit) -> None: version = client.files.versions.delete( @@ -69,7 +69,7 @@ def test_method_delete(self, client: ImageKit) -> None: ) assert_matches_type(VersionDeleteResponse, version, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_delete(self, client: ImageKit) -> None: response = client.files.versions.with_raw_response.delete( @@ -82,7 +82,7 @@ def test_raw_response_delete(self, client: ImageKit) -> None: version = response.parse() assert_matches_type(VersionDeleteResponse, version, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_delete(self, client: ImageKit) -> None: with client.files.versions.with_streaming_response.delete( @@ -97,7 +97,7 @@ def test_streaming_response_delete(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_delete(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): @@ -112,7 +112,7 @@ def test_path_params_delete(self, client: ImageKit) -> None: file_id="fileId", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_get(self, client: ImageKit) -> None: version = client.files.versions.get( @@ -121,7 +121,7 @@ def test_method_get(self, client: ImageKit) -> None: ) assert_matches_type(File, version, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_get(self, client: ImageKit) -> None: response = client.files.versions.with_raw_response.get( @@ -134,7 +134,7 @@ def test_raw_response_get(self, client: ImageKit) -> None: version = response.parse() assert_matches_type(File, version, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_get(self, client: ImageKit) -> None: with client.files.versions.with_streaming_response.get( @@ -149,7 +149,7 @@ def test_streaming_response_get(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_get(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): @@ -164,7 +164,7 @@ def test_path_params_get(self, client: ImageKit) -> None: file_id="fileId", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_restore(self, client: ImageKit) -> None: version = client.files.versions.restore( @@ -173,7 +173,7 @@ def test_method_restore(self, client: ImageKit) -> None: ) assert_matches_type(File, version, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_restore(self, client: ImageKit) -> None: response = client.files.versions.with_raw_response.restore( @@ -186,7 +186,7 @@ def test_raw_response_restore(self, client: ImageKit) -> None: version = response.parse() assert_matches_type(File, version, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_restore(self, client: ImageKit) -> None: with client.files.versions.with_streaming_response.restore( @@ -201,7 +201,7 @@ def test_streaming_response_restore(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_restore(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): @@ -222,7 +222,7 @@ class TestAsyncVersions: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncImageKit) -> None: version = await async_client.files.versions.list( @@ -230,7 +230,7 @@ async def test_method_list(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(VersionListResponse, version, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncImageKit) -> None: response = await async_client.files.versions.with_raw_response.list( @@ -242,7 +242,7 @@ async def test_raw_response_list(self, async_client: AsyncImageKit) -> None: version = await response.parse() assert_matches_type(VersionListResponse, version, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncImageKit) -> None: async with async_client.files.versions.with_streaming_response.list( @@ -256,7 +256,7 @@ async def test_streaming_response_list(self, async_client: AsyncImageKit) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_list(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): @@ -264,7 +264,7 @@ async def test_path_params_list(self, async_client: AsyncImageKit) -> None: "", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncImageKit) -> None: version = await async_client.files.versions.delete( @@ -273,7 +273,7 @@ async def test_method_delete(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(VersionDeleteResponse, version, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncImageKit) -> None: response = await async_client.files.versions.with_raw_response.delete( @@ -286,7 +286,7 @@ async def test_raw_response_delete(self, async_client: AsyncImageKit) -> None: version = await response.parse() assert_matches_type(VersionDeleteResponse, version, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncImageKit) -> None: async with async_client.files.versions.with_streaming_response.delete( @@ -301,7 +301,7 @@ async def test_streaming_response_delete(self, async_client: AsyncImageKit) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_delete(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): @@ -316,7 +316,7 @@ async def test_path_params_delete(self, async_client: AsyncImageKit) -> None: file_id="fileId", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_get(self, async_client: AsyncImageKit) -> None: version = await async_client.files.versions.get( @@ -325,7 +325,7 @@ async def test_method_get(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(File, version, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_get(self, async_client: AsyncImageKit) -> None: response = await async_client.files.versions.with_raw_response.get( @@ -338,7 +338,7 @@ async def test_raw_response_get(self, async_client: AsyncImageKit) -> None: version = await response.parse() assert_matches_type(File, version, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_get(self, async_client: AsyncImageKit) -> None: async with async_client.files.versions.with_streaming_response.get( @@ -353,7 +353,7 @@ async def test_streaming_response_get(self, async_client: AsyncImageKit) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_get(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): @@ -368,7 +368,7 @@ async def test_path_params_get(self, async_client: AsyncImageKit) -> None: file_id="fileId", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_restore(self, async_client: AsyncImageKit) -> None: version = await async_client.files.versions.restore( @@ -377,7 +377,7 @@ async def test_method_restore(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(File, version, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_restore(self, async_client: AsyncImageKit) -> None: response = await async_client.files.versions.with_raw_response.restore( @@ -390,7 +390,7 @@ async def test_raw_response_restore(self, async_client: AsyncImageKit) -> None: version = await response.parse() assert_matches_type(File, version, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_restore(self, async_client: AsyncImageKit) -> None: async with async_client.files.versions.with_streaming_response.restore( @@ -405,7 +405,7 @@ async def test_streaming_response_restore(self, async_client: AsyncImageKit) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_restore(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): diff --git a/tests/api_resources/folders/test_job.py b/tests/api_resources/folders/test_job.py index 2bbc1cf..f6056cf 100644 --- a/tests/api_resources/folders/test_job.py +++ b/tests/api_resources/folders/test_job.py @@ -17,7 +17,7 @@ class TestJob: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_get(self, client: ImageKit) -> None: job = client.folders.job.get( @@ -25,7 +25,7 @@ def test_method_get(self, client: ImageKit) -> None: ) assert_matches_type(JobGetResponse, job, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_get(self, client: ImageKit) -> None: response = client.folders.job.with_raw_response.get( @@ -37,7 +37,7 @@ def test_raw_response_get(self, client: ImageKit) -> None: job = response.parse() assert_matches_type(JobGetResponse, job, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_get(self, client: ImageKit) -> None: with client.folders.job.with_streaming_response.get( @@ -51,7 +51,7 @@ def test_streaming_response_get(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_get(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `job_id` but received ''"): @@ -65,7 +65,7 @@ class TestAsyncJob: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_get(self, async_client: AsyncImageKit) -> None: job = await async_client.folders.job.get( @@ -73,7 +73,7 @@ async def test_method_get(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(JobGetResponse, job, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_get(self, async_client: AsyncImageKit) -> None: response = await async_client.folders.job.with_raw_response.get( @@ -85,7 +85,7 @@ async def test_raw_response_get(self, async_client: AsyncImageKit) -> None: job = await response.parse() assert_matches_type(JobGetResponse, job, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_get(self, async_client: AsyncImageKit) -> None: async with async_client.folders.job.with_streaming_response.get( @@ -99,7 +99,7 @@ async def test_streaming_response_get(self, async_client: AsyncImageKit) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_get(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `job_id` but received ''"): diff --git a/tests/api_resources/test_assets.py b/tests/api_resources/test_assets.py index 6958ecd..808262c 100644 --- a/tests/api_resources/test_assets.py +++ b/tests/api_resources/test_assets.py @@ -17,13 +17,13 @@ class TestAssets: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_list(self, client: ImageKit) -> None: asset = client.assets.list() assert_matches_type(AssetListResponse, asset, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_list_with_all_params(self, client: ImageKit) -> None: asset = client.assets.list( @@ -37,7 +37,7 @@ def test_method_list_with_all_params(self, client: ImageKit) -> None: ) assert_matches_type(AssetListResponse, asset, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_list(self, client: ImageKit) -> None: response = client.assets.with_raw_response.list() @@ -47,7 +47,7 @@ def test_raw_response_list(self, client: ImageKit) -> None: asset = response.parse() assert_matches_type(AssetListResponse, asset, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_list(self, client: ImageKit) -> None: with client.assets.with_streaming_response.list() as response: @@ -65,13 +65,13 @@ class TestAsyncAssets: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncImageKit) -> None: asset = await async_client.assets.list() assert_matches_type(AssetListResponse, asset, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncImageKit) -> None: asset = await async_client.assets.list( @@ -85,7 +85,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncImageKit) -> ) assert_matches_type(AssetListResponse, asset, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncImageKit) -> None: response = await async_client.assets.with_raw_response.list() @@ -95,7 +95,7 @@ async def test_raw_response_list(self, async_client: AsyncImageKit) -> None: asset = await response.parse() assert_matches_type(AssetListResponse, asset, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncImageKit) -> None: async with async_client.assets.with_streaming_response.list() as response: diff --git a/tests/api_resources/test_custom_metadata_fields.py b/tests/api_resources/test_custom_metadata_fields.py index 4c9fed6..0a17495 100644 --- a/tests/api_resources/test_custom_metadata_fields.py +++ b/tests/api_resources/test_custom_metadata_fields.py @@ -21,7 +21,7 @@ class TestCustomMetadataFields: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create(self, client: ImageKit) -> None: custom_metadata_field = client.custom_metadata_fields.create( @@ -31,7 +31,7 @@ def test_method_create(self, client: ImageKit) -> None: ) assert_matches_type(CustomMetadataField, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create_with_all_params(self, client: ImageKit) -> None: custom_metadata_field = client.custom_metadata_fields.create( @@ -50,7 +50,7 @@ def test_method_create_with_all_params(self, client: ImageKit) -> None: ) assert_matches_type(CustomMetadataField, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_create(self, client: ImageKit) -> None: response = client.custom_metadata_fields.with_raw_response.create( @@ -64,7 +64,7 @@ def test_raw_response_create(self, client: ImageKit) -> None: custom_metadata_field = response.parse() assert_matches_type(CustomMetadataField, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_create(self, client: ImageKit) -> None: with client.custom_metadata_fields.with_streaming_response.create( @@ -80,7 +80,7 @@ def test_streaming_response_create(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update(self, client: ImageKit) -> None: custom_metadata_field = client.custom_metadata_fields.update( @@ -88,7 +88,7 @@ def test_method_update(self, client: ImageKit) -> None: ) assert_matches_type(CustomMetadataField, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_with_all_params(self, client: ImageKit) -> None: custom_metadata_field = client.custom_metadata_fields.update( @@ -106,7 +106,7 @@ def test_method_update_with_all_params(self, client: ImageKit) -> None: ) assert_matches_type(CustomMetadataField, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_update(self, client: ImageKit) -> None: response = client.custom_metadata_fields.with_raw_response.update( @@ -118,7 +118,7 @@ def test_raw_response_update(self, client: ImageKit) -> None: custom_metadata_field = response.parse() assert_matches_type(CustomMetadataField, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_update(self, client: ImageKit) -> None: with client.custom_metadata_fields.with_streaming_response.update( @@ -132,7 +132,7 @@ def test_streaming_response_update(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_update(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -140,13 +140,13 @@ def test_path_params_update(self, client: ImageKit) -> None: id="", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_list(self, client: ImageKit) -> None: custom_metadata_field = client.custom_metadata_fields.list() assert_matches_type(CustomMetadataFieldListResponse, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_list_with_all_params(self, client: ImageKit) -> None: custom_metadata_field = client.custom_metadata_fields.list( @@ -155,7 +155,7 @@ def test_method_list_with_all_params(self, client: ImageKit) -> None: ) assert_matches_type(CustomMetadataFieldListResponse, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_list(self, client: ImageKit) -> None: response = client.custom_metadata_fields.with_raw_response.list() @@ -165,7 +165,7 @@ def test_raw_response_list(self, client: ImageKit) -> None: custom_metadata_field = response.parse() assert_matches_type(CustomMetadataFieldListResponse, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_list(self, client: ImageKit) -> None: with client.custom_metadata_fields.with_streaming_response.list() as response: @@ -177,7 +177,7 @@ def test_streaming_response_list(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_delete(self, client: ImageKit) -> None: custom_metadata_field = client.custom_metadata_fields.delete( @@ -185,7 +185,7 @@ def test_method_delete(self, client: ImageKit) -> None: ) assert_matches_type(CustomMetadataFieldDeleteResponse, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_delete(self, client: ImageKit) -> None: response = client.custom_metadata_fields.with_raw_response.delete( @@ -197,7 +197,7 @@ def test_raw_response_delete(self, client: ImageKit) -> None: custom_metadata_field = response.parse() assert_matches_type(CustomMetadataFieldDeleteResponse, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_delete(self, client: ImageKit) -> None: with client.custom_metadata_fields.with_streaming_response.delete( @@ -211,7 +211,7 @@ def test_streaming_response_delete(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_delete(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -225,7 +225,7 @@ class TestAsyncCustomMetadataFields: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncImageKit) -> None: custom_metadata_field = await async_client.custom_metadata_fields.create( @@ -235,7 +235,7 @@ async def test_method_create(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(CustomMetadataField, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncImageKit) -> None: custom_metadata_field = await async_client.custom_metadata_fields.create( @@ -254,7 +254,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncImageKit) ) assert_matches_type(CustomMetadataField, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncImageKit) -> None: response = await async_client.custom_metadata_fields.with_raw_response.create( @@ -268,7 +268,7 @@ async def test_raw_response_create(self, async_client: AsyncImageKit) -> None: custom_metadata_field = await response.parse() assert_matches_type(CustomMetadataField, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncImageKit) -> None: async with async_client.custom_metadata_fields.with_streaming_response.create( @@ -284,7 +284,7 @@ async def test_streaming_response_create(self, async_client: AsyncImageKit) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncImageKit) -> None: custom_metadata_field = await async_client.custom_metadata_fields.update( @@ -292,7 +292,7 @@ async def test_method_update(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(CustomMetadataField, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncImageKit) -> None: custom_metadata_field = await async_client.custom_metadata_fields.update( @@ -310,7 +310,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncImageKit) ) assert_matches_type(CustomMetadataField, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncImageKit) -> None: response = await async_client.custom_metadata_fields.with_raw_response.update( @@ -322,7 +322,7 @@ async def test_raw_response_update(self, async_client: AsyncImageKit) -> None: custom_metadata_field = await response.parse() assert_matches_type(CustomMetadataField, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncImageKit) -> None: async with async_client.custom_metadata_fields.with_streaming_response.update( @@ -336,7 +336,7 @@ async def test_streaming_response_update(self, async_client: AsyncImageKit) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_update(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -344,13 +344,13 @@ async def test_path_params_update(self, async_client: AsyncImageKit) -> None: id="", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncImageKit) -> None: custom_metadata_field = await async_client.custom_metadata_fields.list() assert_matches_type(CustomMetadataFieldListResponse, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncImageKit) -> None: custom_metadata_field = await async_client.custom_metadata_fields.list( @@ -359,7 +359,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncImageKit) -> ) assert_matches_type(CustomMetadataFieldListResponse, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncImageKit) -> None: response = await async_client.custom_metadata_fields.with_raw_response.list() @@ -369,7 +369,7 @@ async def test_raw_response_list(self, async_client: AsyncImageKit) -> None: custom_metadata_field = await response.parse() assert_matches_type(CustomMetadataFieldListResponse, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncImageKit) -> None: async with async_client.custom_metadata_fields.with_streaming_response.list() as response: @@ -381,7 +381,7 @@ async def test_streaming_response_list(self, async_client: AsyncImageKit) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncImageKit) -> None: custom_metadata_field = await async_client.custom_metadata_fields.delete( @@ -389,7 +389,7 @@ async def test_method_delete(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(CustomMetadataFieldDeleteResponse, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncImageKit) -> None: response = await async_client.custom_metadata_fields.with_raw_response.delete( @@ -401,7 +401,7 @@ async def test_raw_response_delete(self, async_client: AsyncImageKit) -> None: custom_metadata_field = await response.parse() assert_matches_type(CustomMetadataFieldDeleteResponse, custom_metadata_field, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncImageKit) -> None: async with async_client.custom_metadata_fields.with_streaming_response.delete( @@ -415,7 +415,7 @@ async def test_streaming_response_delete(self, async_client: AsyncImageKit) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_delete(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): diff --git a/tests/api_resources/test_dummy.py b/tests/api_resources/test_dummy.py index 8d6dd18..11b63ba 100644 --- a/tests/api_resources/test_dummy.py +++ b/tests/api_resources/test_dummy.py @@ -16,13 +16,13 @@ class TestDummy: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create(self, client: ImageKit) -> None: dummy = client.dummy.create() assert dummy is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create_with_all_params(self, client: ImageKit) -> None: dummy = client.dummy.create( @@ -805,7 +805,7 @@ def test_method_create_with_all_params(self, client: ImageKit) -> None: ) assert dummy is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_create(self, client: ImageKit) -> None: response = client.dummy.with_raw_response.create() @@ -815,7 +815,7 @@ def test_raw_response_create(self, client: ImageKit) -> None: dummy = response.parse() assert dummy is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_create(self, client: ImageKit) -> None: with client.dummy.with_streaming_response.create() as response: @@ -833,13 +833,13 @@ class TestAsyncDummy: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncImageKit) -> None: dummy = await async_client.dummy.create() assert dummy is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncImageKit) -> None: dummy = await async_client.dummy.create( @@ -1622,7 +1622,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncImageKit) ) assert dummy is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncImageKit) -> None: response = await async_client.dummy.with_raw_response.create() @@ -1632,7 +1632,7 @@ async def test_raw_response_create(self, async_client: AsyncImageKit) -> None: dummy = await response.parse() assert dummy is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncImageKit) -> None: async with async_client.dummy.with_streaming_response.create() as response: diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py index c41be9b..f4e3b02 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -24,7 +24,7 @@ class TestFiles: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_overload_1(self, client: ImageKit) -> None: file = client.files.update( @@ -32,7 +32,7 @@ def test_method_update_overload_1(self, client: ImageKit) -> None: ) assert_matches_type(FileUpdateResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_with_all_params_overload_1(self, client: ImageKit) -> None: file = client.files.update( @@ -116,7 +116,7 @@ def test_method_update_with_all_params_overload_1(self, client: ImageKit) -> Non ) assert_matches_type(FileUpdateResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_update_overload_1(self, client: ImageKit) -> None: response = client.files.with_raw_response.update( @@ -128,7 +128,7 @@ def test_raw_response_update_overload_1(self, client: ImageKit) -> None: file = response.parse() assert_matches_type(FileUpdateResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_update_overload_1(self, client: ImageKit) -> None: with client.files.with_streaming_response.update( @@ -142,7 +142,7 @@ def test_streaming_response_update_overload_1(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_update_overload_1(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): @@ -150,7 +150,7 @@ def test_path_params_update_overload_1(self, client: ImageKit) -> None: file_id="", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_overload_2(self, client: ImageKit) -> None: file = client.files.update( @@ -158,7 +158,7 @@ def test_method_update_overload_2(self, client: ImageKit) -> None: ) assert_matches_type(FileUpdateResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_with_all_params_overload_2(self, client: ImageKit) -> None: file = client.files.update( @@ -170,7 +170,7 @@ def test_method_update_with_all_params_overload_2(self, client: ImageKit) -> Non ) assert_matches_type(FileUpdateResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_update_overload_2(self, client: ImageKit) -> None: response = client.files.with_raw_response.update( @@ -182,7 +182,7 @@ def test_raw_response_update_overload_2(self, client: ImageKit) -> None: file = response.parse() assert_matches_type(FileUpdateResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_update_overload_2(self, client: ImageKit) -> None: with client.files.with_streaming_response.update( @@ -196,7 +196,7 @@ def test_streaming_response_update_overload_2(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_update_overload_2(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): @@ -204,7 +204,7 @@ def test_path_params_update_overload_2(self, client: ImageKit) -> None: file_id="", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_delete(self, client: ImageKit) -> None: file = client.files.delete( @@ -212,7 +212,7 @@ def test_method_delete(self, client: ImageKit) -> None: ) assert file is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_delete(self, client: ImageKit) -> None: response = client.files.with_raw_response.delete( @@ -224,7 +224,7 @@ def test_raw_response_delete(self, client: ImageKit) -> None: file = response.parse() assert file is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_delete(self, client: ImageKit) -> None: with client.files.with_streaming_response.delete( @@ -238,7 +238,7 @@ def test_streaming_response_delete(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_delete(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): @@ -246,7 +246,7 @@ def test_path_params_delete(self, client: ImageKit) -> None: "", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_copy(self, client: ImageKit) -> None: file = client.files.copy( @@ -255,7 +255,7 @@ def test_method_copy(self, client: ImageKit) -> None: ) assert_matches_type(FileCopyResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_copy_with_all_params(self, client: ImageKit) -> None: file = client.files.copy( @@ -265,7 +265,7 @@ def test_method_copy_with_all_params(self, client: ImageKit) -> None: ) assert_matches_type(FileCopyResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_copy(self, client: ImageKit) -> None: response = client.files.with_raw_response.copy( @@ -278,7 +278,7 @@ def test_raw_response_copy(self, client: ImageKit) -> None: file = response.parse() assert_matches_type(FileCopyResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_copy(self, client: ImageKit) -> None: with client.files.with_streaming_response.copy( @@ -293,7 +293,7 @@ def test_streaming_response_copy(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_get(self, client: ImageKit) -> None: file = client.files.get( @@ -301,7 +301,7 @@ def test_method_get(self, client: ImageKit) -> None: ) assert_matches_type(File, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_get(self, client: ImageKit) -> None: response = client.files.with_raw_response.get( @@ -313,7 +313,7 @@ def test_raw_response_get(self, client: ImageKit) -> None: file = response.parse() assert_matches_type(File, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_get(self, client: ImageKit) -> None: with client.files.with_streaming_response.get( @@ -327,7 +327,7 @@ def test_streaming_response_get(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_get(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): @@ -335,7 +335,7 @@ def test_path_params_get(self, client: ImageKit) -> None: "", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_move(self, client: ImageKit) -> None: file = client.files.move( @@ -344,7 +344,7 @@ def test_method_move(self, client: ImageKit) -> None: ) assert_matches_type(FileMoveResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_move(self, client: ImageKit) -> None: response = client.files.with_raw_response.move( @@ -357,7 +357,7 @@ def test_raw_response_move(self, client: ImageKit) -> None: file = response.parse() assert_matches_type(FileMoveResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_move(self, client: ImageKit) -> None: with client.files.with_streaming_response.move( @@ -372,7 +372,7 @@ def test_streaming_response_move(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_rename(self, client: ImageKit) -> None: file = client.files.rename( @@ -381,7 +381,7 @@ def test_method_rename(self, client: ImageKit) -> None: ) assert_matches_type(FileRenameResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_rename_with_all_params(self, client: ImageKit) -> None: file = client.files.rename( @@ -391,7 +391,7 @@ def test_method_rename_with_all_params(self, client: ImageKit) -> None: ) assert_matches_type(FileRenameResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_rename(self, client: ImageKit) -> None: response = client.files.with_raw_response.rename( @@ -404,7 +404,7 @@ def test_raw_response_rename(self, client: ImageKit) -> None: file = response.parse() assert_matches_type(FileRenameResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_rename(self, client: ImageKit) -> None: with client.files.with_streaming_response.rename( @@ -419,7 +419,7 @@ def test_streaming_response_rename(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_upload(self, client: ImageKit) -> None: file = client.files.upload( @@ -428,7 +428,7 @@ def test_method_upload(self, client: ImageKit) -> None: ) assert_matches_type(FileUploadResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_upload_with_all_params(self, client: ImageKit) -> None: file = client.files.upload( @@ -543,7 +543,7 @@ def test_method_upload_with_all_params(self, client: ImageKit) -> None: ) assert_matches_type(FileUploadResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_upload(self, client: ImageKit) -> None: response = client.files.with_raw_response.upload( @@ -556,7 +556,7 @@ def test_raw_response_upload(self, client: ImageKit) -> None: file = response.parse() assert_matches_type(FileUploadResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_upload(self, client: ImageKit) -> None: with client.files.with_streaming_response.upload( @@ -577,7 +577,7 @@ class TestAsyncFiles: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_overload_1(self, async_client: AsyncImageKit) -> None: file = await async_client.files.update( @@ -585,7 +585,7 @@ async def test_method_update_overload_1(self, async_client: AsyncImageKit) -> No ) assert_matches_type(FileUpdateResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncImageKit) -> None: file = await async_client.files.update( @@ -669,7 +669,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn ) assert_matches_type(FileUpdateResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncImageKit) -> None: response = await async_client.files.with_raw_response.update( @@ -681,7 +681,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncImageKit) file = await response.parse() assert_matches_type(FileUpdateResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncImageKit) -> None: async with async_client.files.with_streaming_response.update( @@ -695,7 +695,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncIma assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_update_overload_1(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): @@ -703,7 +703,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncImageKit) file_id="", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_overload_2(self, async_client: AsyncImageKit) -> None: file = await async_client.files.update( @@ -711,7 +711,7 @@ async def test_method_update_overload_2(self, async_client: AsyncImageKit) -> No ) assert_matches_type(FileUpdateResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncImageKit) -> None: file = await async_client.files.update( @@ -723,7 +723,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn ) assert_matches_type(FileUpdateResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncImageKit) -> None: response = await async_client.files.with_raw_response.update( @@ -735,7 +735,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncImageKit) file = await response.parse() assert_matches_type(FileUpdateResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncImageKit) -> None: async with async_client.files.with_streaming_response.update( @@ -749,7 +749,7 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncIma assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_update_overload_2(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): @@ -757,7 +757,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncImageKit) file_id="", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncImageKit) -> None: file = await async_client.files.delete( @@ -765,7 +765,7 @@ async def test_method_delete(self, async_client: AsyncImageKit) -> None: ) assert file is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncImageKit) -> None: response = await async_client.files.with_raw_response.delete( @@ -777,7 +777,7 @@ async def test_raw_response_delete(self, async_client: AsyncImageKit) -> None: file = await response.parse() assert file is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncImageKit) -> None: async with async_client.files.with_streaming_response.delete( @@ -791,7 +791,7 @@ async def test_streaming_response_delete(self, async_client: AsyncImageKit) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_delete(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): @@ -799,7 +799,7 @@ async def test_path_params_delete(self, async_client: AsyncImageKit) -> None: "", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_copy(self, async_client: AsyncImageKit) -> None: file = await async_client.files.copy( @@ -808,7 +808,7 @@ async def test_method_copy(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(FileCopyResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_copy_with_all_params(self, async_client: AsyncImageKit) -> None: file = await async_client.files.copy( @@ -818,7 +818,7 @@ async def test_method_copy_with_all_params(self, async_client: AsyncImageKit) -> ) assert_matches_type(FileCopyResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_copy(self, async_client: AsyncImageKit) -> None: response = await async_client.files.with_raw_response.copy( @@ -831,7 +831,7 @@ async def test_raw_response_copy(self, async_client: AsyncImageKit) -> None: file = await response.parse() assert_matches_type(FileCopyResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_copy(self, async_client: AsyncImageKit) -> None: async with async_client.files.with_streaming_response.copy( @@ -846,7 +846,7 @@ async def test_streaming_response_copy(self, async_client: AsyncImageKit) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_get(self, async_client: AsyncImageKit) -> None: file = await async_client.files.get( @@ -854,7 +854,7 @@ async def test_method_get(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(File, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_get(self, async_client: AsyncImageKit) -> None: response = await async_client.files.with_raw_response.get( @@ -866,7 +866,7 @@ async def test_raw_response_get(self, async_client: AsyncImageKit) -> None: file = await response.parse() assert_matches_type(File, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_get(self, async_client: AsyncImageKit) -> None: async with async_client.files.with_streaming_response.get( @@ -880,7 +880,7 @@ async def test_streaming_response_get(self, async_client: AsyncImageKit) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_get(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): @@ -888,7 +888,7 @@ async def test_path_params_get(self, async_client: AsyncImageKit) -> None: "", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_move(self, async_client: AsyncImageKit) -> None: file = await async_client.files.move( @@ -897,7 +897,7 @@ async def test_method_move(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(FileMoveResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_move(self, async_client: AsyncImageKit) -> None: response = await async_client.files.with_raw_response.move( @@ -910,7 +910,7 @@ async def test_raw_response_move(self, async_client: AsyncImageKit) -> None: file = await response.parse() assert_matches_type(FileMoveResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_move(self, async_client: AsyncImageKit) -> None: async with async_client.files.with_streaming_response.move( @@ -925,7 +925,7 @@ async def test_streaming_response_move(self, async_client: AsyncImageKit) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_rename(self, async_client: AsyncImageKit) -> None: file = await async_client.files.rename( @@ -934,7 +934,7 @@ async def test_method_rename(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(FileRenameResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_rename_with_all_params(self, async_client: AsyncImageKit) -> None: file = await async_client.files.rename( @@ -944,7 +944,7 @@ async def test_method_rename_with_all_params(self, async_client: AsyncImageKit) ) assert_matches_type(FileRenameResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_rename(self, async_client: AsyncImageKit) -> None: response = await async_client.files.with_raw_response.rename( @@ -957,7 +957,7 @@ async def test_raw_response_rename(self, async_client: AsyncImageKit) -> None: file = await response.parse() assert_matches_type(FileRenameResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_rename(self, async_client: AsyncImageKit) -> None: async with async_client.files.with_streaming_response.rename( @@ -972,7 +972,7 @@ async def test_streaming_response_rename(self, async_client: AsyncImageKit) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_upload(self, async_client: AsyncImageKit) -> None: file = await async_client.files.upload( @@ -981,7 +981,7 @@ async def test_method_upload(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(FileUploadResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_upload_with_all_params(self, async_client: AsyncImageKit) -> None: file = await async_client.files.upload( @@ -1096,7 +1096,7 @@ async def test_method_upload_with_all_params(self, async_client: AsyncImageKit) ) assert_matches_type(FileUploadResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_upload(self, async_client: AsyncImageKit) -> None: response = await async_client.files.with_raw_response.upload( @@ -1109,7 +1109,7 @@ async def test_raw_response_upload(self, async_client: AsyncImageKit) -> None: file = await response.parse() assert_matches_type(FileUploadResponse, file, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_upload(self, async_client: AsyncImageKit) -> None: async with async_client.files.with_streaming_response.upload( diff --git a/tests/api_resources/test_folders.py b/tests/api_resources/test_folders.py index ad5d83f..26b5980 100644 --- a/tests/api_resources/test_folders.py +++ b/tests/api_resources/test_folders.py @@ -23,7 +23,7 @@ class TestFolders: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create(self, client: ImageKit) -> None: folder = client.folders.create( @@ -32,7 +32,7 @@ def test_method_create(self, client: ImageKit) -> None: ) assert_matches_type(FolderCreateResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_create(self, client: ImageKit) -> None: response = client.folders.with_raw_response.create( @@ -45,7 +45,7 @@ def test_raw_response_create(self, client: ImageKit) -> None: folder = response.parse() assert_matches_type(FolderCreateResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_create(self, client: ImageKit) -> None: with client.folders.with_streaming_response.create( @@ -60,7 +60,7 @@ def test_streaming_response_create(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_delete(self, client: ImageKit) -> None: folder = client.folders.delete( @@ -68,7 +68,7 @@ def test_method_delete(self, client: ImageKit) -> None: ) assert_matches_type(FolderDeleteResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_delete(self, client: ImageKit) -> None: response = client.folders.with_raw_response.delete( @@ -80,7 +80,7 @@ def test_raw_response_delete(self, client: ImageKit) -> None: folder = response.parse() assert_matches_type(FolderDeleteResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_delete(self, client: ImageKit) -> None: with client.folders.with_streaming_response.delete( @@ -94,7 +94,7 @@ def test_streaming_response_delete(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_copy(self, client: ImageKit) -> None: folder = client.folders.copy( @@ -103,7 +103,7 @@ def test_method_copy(self, client: ImageKit) -> None: ) assert_matches_type(FolderCopyResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_copy_with_all_params(self, client: ImageKit) -> None: folder = client.folders.copy( @@ -113,7 +113,7 @@ def test_method_copy_with_all_params(self, client: ImageKit) -> None: ) assert_matches_type(FolderCopyResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_copy(self, client: ImageKit) -> None: response = client.folders.with_raw_response.copy( @@ -126,7 +126,7 @@ def test_raw_response_copy(self, client: ImageKit) -> None: folder = response.parse() assert_matches_type(FolderCopyResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_copy(self, client: ImageKit) -> None: with client.folders.with_streaming_response.copy( @@ -141,7 +141,7 @@ def test_streaming_response_copy(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_move(self, client: ImageKit) -> None: folder = client.folders.move( @@ -150,7 +150,7 @@ def test_method_move(self, client: ImageKit) -> None: ) assert_matches_type(FolderMoveResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_move(self, client: ImageKit) -> None: response = client.folders.with_raw_response.move( @@ -163,7 +163,7 @@ def test_raw_response_move(self, client: ImageKit) -> None: folder = response.parse() assert_matches_type(FolderMoveResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_move(self, client: ImageKit) -> None: with client.folders.with_streaming_response.move( @@ -178,7 +178,7 @@ def test_streaming_response_move(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_rename(self, client: ImageKit) -> None: folder = client.folders.rename( @@ -187,7 +187,7 @@ def test_method_rename(self, client: ImageKit) -> None: ) assert_matches_type(FolderRenameResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_rename_with_all_params(self, client: ImageKit) -> None: folder = client.folders.rename( @@ -197,7 +197,7 @@ def test_method_rename_with_all_params(self, client: ImageKit) -> None: ) assert_matches_type(FolderRenameResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_rename(self, client: ImageKit) -> None: response = client.folders.with_raw_response.rename( @@ -210,7 +210,7 @@ def test_raw_response_rename(self, client: ImageKit) -> None: folder = response.parse() assert_matches_type(FolderRenameResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_rename(self, client: ImageKit) -> None: with client.folders.with_streaming_response.rename( @@ -231,7 +231,7 @@ class TestAsyncFolders: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncImageKit) -> None: folder = await async_client.folders.create( @@ -240,7 +240,7 @@ async def test_method_create(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(FolderCreateResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncImageKit) -> None: response = await async_client.folders.with_raw_response.create( @@ -253,7 +253,7 @@ async def test_raw_response_create(self, async_client: AsyncImageKit) -> None: folder = await response.parse() assert_matches_type(FolderCreateResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncImageKit) -> None: async with async_client.folders.with_streaming_response.create( @@ -268,7 +268,7 @@ async def test_streaming_response_create(self, async_client: AsyncImageKit) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncImageKit) -> None: folder = await async_client.folders.delete( @@ -276,7 +276,7 @@ async def test_method_delete(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(FolderDeleteResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncImageKit) -> None: response = await async_client.folders.with_raw_response.delete( @@ -288,7 +288,7 @@ async def test_raw_response_delete(self, async_client: AsyncImageKit) -> None: folder = await response.parse() assert_matches_type(FolderDeleteResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncImageKit) -> None: async with async_client.folders.with_streaming_response.delete( @@ -302,7 +302,7 @@ async def test_streaming_response_delete(self, async_client: AsyncImageKit) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_copy(self, async_client: AsyncImageKit) -> None: folder = await async_client.folders.copy( @@ -311,7 +311,7 @@ async def test_method_copy(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(FolderCopyResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_copy_with_all_params(self, async_client: AsyncImageKit) -> None: folder = await async_client.folders.copy( @@ -321,7 +321,7 @@ async def test_method_copy_with_all_params(self, async_client: AsyncImageKit) -> ) assert_matches_type(FolderCopyResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_copy(self, async_client: AsyncImageKit) -> None: response = await async_client.folders.with_raw_response.copy( @@ -334,7 +334,7 @@ async def test_raw_response_copy(self, async_client: AsyncImageKit) -> None: folder = await response.parse() assert_matches_type(FolderCopyResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_copy(self, async_client: AsyncImageKit) -> None: async with async_client.folders.with_streaming_response.copy( @@ -349,7 +349,7 @@ async def test_streaming_response_copy(self, async_client: AsyncImageKit) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_move(self, async_client: AsyncImageKit) -> None: folder = await async_client.folders.move( @@ -358,7 +358,7 @@ async def test_method_move(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(FolderMoveResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_move(self, async_client: AsyncImageKit) -> None: response = await async_client.folders.with_raw_response.move( @@ -371,7 +371,7 @@ async def test_raw_response_move(self, async_client: AsyncImageKit) -> None: folder = await response.parse() assert_matches_type(FolderMoveResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_move(self, async_client: AsyncImageKit) -> None: async with async_client.folders.with_streaming_response.move( @@ -386,7 +386,7 @@ async def test_streaming_response_move(self, async_client: AsyncImageKit) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_rename(self, async_client: AsyncImageKit) -> None: folder = await async_client.folders.rename( @@ -395,7 +395,7 @@ async def test_method_rename(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(FolderRenameResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_rename_with_all_params(self, async_client: AsyncImageKit) -> None: folder = await async_client.folders.rename( @@ -405,7 +405,7 @@ async def test_method_rename_with_all_params(self, async_client: AsyncImageKit) ) assert_matches_type(FolderRenameResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_rename(self, async_client: AsyncImageKit) -> None: response = await async_client.folders.with_raw_response.rename( @@ -418,7 +418,7 @@ async def test_raw_response_rename(self, async_client: AsyncImageKit) -> None: folder = await response.parse() assert_matches_type(FolderRenameResponse, folder, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_rename(self, async_client: AsyncImageKit) -> None: async with async_client.folders.with_streaming_response.rename( diff --git a/tests/api_resources/test_saved_extensions.py b/tests/api_resources/test_saved_extensions.py index 4a12279..4538098 100644 --- a/tests/api_resources/test_saved_extensions.py +++ b/tests/api_resources/test_saved_extensions.py @@ -20,7 +20,7 @@ class TestSavedExtensions: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create(self, client: ImageKit) -> None: saved_extension = client.saved_extensions.create( @@ -30,7 +30,7 @@ def test_method_create(self, client: ImageKit) -> None: ) assert_matches_type(SavedExtension, saved_extension, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_create_with_all_params(self, client: ImageKit) -> None: saved_extension = client.saved_extensions.create( @@ -48,7 +48,7 @@ def test_method_create_with_all_params(self, client: ImageKit) -> None: ) assert_matches_type(SavedExtension, saved_extension, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_create(self, client: ImageKit) -> None: response = client.saved_extensions.with_raw_response.create( @@ -62,7 +62,7 @@ def test_raw_response_create(self, client: ImageKit) -> None: saved_extension = response.parse() assert_matches_type(SavedExtension, saved_extension, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_create(self, client: ImageKit) -> None: with client.saved_extensions.with_streaming_response.create( @@ -78,7 +78,7 @@ def test_streaming_response_create(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update(self, client: ImageKit) -> None: saved_extension = client.saved_extensions.update( @@ -86,7 +86,7 @@ def test_method_update(self, client: ImageKit) -> None: ) assert_matches_type(SavedExtension, saved_extension, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_update_with_all_params(self, client: ImageKit) -> None: saved_extension = client.saved_extensions.update( @@ -105,7 +105,7 @@ def test_method_update_with_all_params(self, client: ImageKit) -> None: ) assert_matches_type(SavedExtension, saved_extension, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_update(self, client: ImageKit) -> None: response = client.saved_extensions.with_raw_response.update( @@ -117,7 +117,7 @@ def test_raw_response_update(self, client: ImageKit) -> None: saved_extension = response.parse() assert_matches_type(SavedExtension, saved_extension, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_update(self, client: ImageKit) -> None: with client.saved_extensions.with_streaming_response.update( @@ -131,7 +131,7 @@ def test_streaming_response_update(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_update(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -139,13 +139,13 @@ def test_path_params_update(self, client: ImageKit) -> None: id="", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_list(self, client: ImageKit) -> None: saved_extension = client.saved_extensions.list() assert_matches_type(SavedExtensionListResponse, saved_extension, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_list(self, client: ImageKit) -> None: response = client.saved_extensions.with_raw_response.list() @@ -155,7 +155,7 @@ def test_raw_response_list(self, client: ImageKit) -> None: saved_extension = response.parse() assert_matches_type(SavedExtensionListResponse, saved_extension, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_list(self, client: ImageKit) -> None: with client.saved_extensions.with_streaming_response.list() as response: @@ -167,7 +167,7 @@ def test_streaming_response_list(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_delete(self, client: ImageKit) -> None: saved_extension = client.saved_extensions.delete( @@ -175,7 +175,7 @@ def test_method_delete(self, client: ImageKit) -> None: ) assert saved_extension is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_delete(self, client: ImageKit) -> None: response = client.saved_extensions.with_raw_response.delete( @@ -187,7 +187,7 @@ def test_raw_response_delete(self, client: ImageKit) -> None: saved_extension = response.parse() assert saved_extension is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_delete(self, client: ImageKit) -> None: with client.saved_extensions.with_streaming_response.delete( @@ -201,7 +201,7 @@ def test_streaming_response_delete(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_delete(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -209,7 +209,7 @@ def test_path_params_delete(self, client: ImageKit) -> None: "", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_get(self, client: ImageKit) -> None: saved_extension = client.saved_extensions.get( @@ -217,7 +217,7 @@ def test_method_get(self, client: ImageKit) -> None: ) assert_matches_type(SavedExtension, saved_extension, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_get(self, client: ImageKit) -> None: response = client.saved_extensions.with_raw_response.get( @@ -229,7 +229,7 @@ def test_raw_response_get(self, client: ImageKit) -> None: saved_extension = response.parse() assert_matches_type(SavedExtension, saved_extension, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_get(self, client: ImageKit) -> None: with client.saved_extensions.with_streaming_response.get( @@ -243,7 +243,7 @@ def test_streaming_response_get(self, client: ImageKit) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_path_params_get(self, client: ImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -257,7 +257,7 @@ class TestAsyncSavedExtensions: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncImageKit) -> None: saved_extension = await async_client.saved_extensions.create( @@ -267,7 +267,7 @@ async def test_method_create(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(SavedExtension, saved_extension, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncImageKit) -> None: saved_extension = await async_client.saved_extensions.create( @@ -285,7 +285,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncImageKit) ) assert_matches_type(SavedExtension, saved_extension, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncImageKit) -> None: response = await async_client.saved_extensions.with_raw_response.create( @@ -299,7 +299,7 @@ async def test_raw_response_create(self, async_client: AsyncImageKit) -> None: saved_extension = await response.parse() assert_matches_type(SavedExtension, saved_extension, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncImageKit) -> None: async with async_client.saved_extensions.with_streaming_response.create( @@ -315,7 +315,7 @@ async def test_streaming_response_create(self, async_client: AsyncImageKit) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncImageKit) -> None: saved_extension = await async_client.saved_extensions.update( @@ -323,7 +323,7 @@ async def test_method_update(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(SavedExtension, saved_extension, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncImageKit) -> None: saved_extension = await async_client.saved_extensions.update( @@ -342,7 +342,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncImageKit) ) assert_matches_type(SavedExtension, saved_extension, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncImageKit) -> None: response = await async_client.saved_extensions.with_raw_response.update( @@ -354,7 +354,7 @@ async def test_raw_response_update(self, async_client: AsyncImageKit) -> None: saved_extension = await response.parse() assert_matches_type(SavedExtension, saved_extension, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncImageKit) -> None: async with async_client.saved_extensions.with_streaming_response.update( @@ -368,7 +368,7 @@ async def test_streaming_response_update(self, async_client: AsyncImageKit) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_update(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -376,13 +376,13 @@ async def test_path_params_update(self, async_client: AsyncImageKit) -> None: id="", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncImageKit) -> None: saved_extension = await async_client.saved_extensions.list() assert_matches_type(SavedExtensionListResponse, saved_extension, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncImageKit) -> None: response = await async_client.saved_extensions.with_raw_response.list() @@ -392,7 +392,7 @@ async def test_raw_response_list(self, async_client: AsyncImageKit) -> None: saved_extension = await response.parse() assert_matches_type(SavedExtensionListResponse, saved_extension, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncImageKit) -> None: async with async_client.saved_extensions.with_streaming_response.list() as response: @@ -404,7 +404,7 @@ async def test_streaming_response_list(self, async_client: AsyncImageKit) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncImageKit) -> None: saved_extension = await async_client.saved_extensions.delete( @@ -412,7 +412,7 @@ async def test_method_delete(self, async_client: AsyncImageKit) -> None: ) assert saved_extension is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncImageKit) -> None: response = await async_client.saved_extensions.with_raw_response.delete( @@ -424,7 +424,7 @@ async def test_raw_response_delete(self, async_client: AsyncImageKit) -> None: saved_extension = await response.parse() assert saved_extension is None - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncImageKit) -> None: async with async_client.saved_extensions.with_streaming_response.delete( @@ -438,7 +438,7 @@ async def test_streaming_response_delete(self, async_client: AsyncImageKit) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_delete(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): @@ -446,7 +446,7 @@ async def test_path_params_delete(self, async_client: AsyncImageKit) -> None: "", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_get(self, async_client: AsyncImageKit) -> None: saved_extension = await async_client.saved_extensions.get( @@ -454,7 +454,7 @@ async def test_method_get(self, async_client: AsyncImageKit) -> None: ) assert_matches_type(SavedExtension, saved_extension, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_get(self, async_client: AsyncImageKit) -> None: response = await async_client.saved_extensions.with_raw_response.get( @@ -466,7 +466,7 @@ async def test_raw_response_get(self, async_client: AsyncImageKit) -> None: saved_extension = await response.parse() assert_matches_type(SavedExtension, saved_extension, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_get(self, async_client: AsyncImageKit) -> None: async with async_client.saved_extensions.with_streaming_response.get( @@ -480,7 +480,7 @@ async def test_streaming_response_get(self, async_client: AsyncImageKit) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_path_params_get(self, async_client: AsyncImageKit) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): From c0dee43afe3bc1f6ea35649532594e59fb4b8953 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 13:30:03 +0000 Subject: [PATCH 06/19] chore(internal): add request options to SSE classes --- src/imagekitio/_response.py | 3 +++ src/imagekitio/_streaming.py | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/imagekitio/_response.py b/src/imagekitio/_response.py index ff8fc4f..68d4757 100644 --- a/src/imagekitio/_response.py +++ b/src/imagekitio/_response.py @@ -152,6 +152,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: ), response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) @@ -162,6 +163,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: cast_to=extract_stream_chunk_type(self._stream_cls), response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) @@ -175,6 +177,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: cast_to=cast_to, response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) diff --git a/src/imagekitio/_streaming.py b/src/imagekitio/_streaming.py index c4a0e31..dec164a 100644 --- a/src/imagekitio/_streaming.py +++ b/src/imagekitio/_streaming.py @@ -4,7 +4,7 @@ import json import inspect from types import TracebackType -from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, AsyncIterator, cast +from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, Optional, AsyncIterator, cast from typing_extensions import Self, Protocol, TypeGuard, override, get_origin, runtime_checkable import httpx @@ -13,6 +13,7 @@ if TYPE_CHECKING: from ._client import ImageKit, AsyncImageKit + from ._models import FinalRequestOptions _T = TypeVar("_T") @@ -22,7 +23,7 @@ class Stream(Generic[_T]): """Provides the core interface to iterate over a synchronous stream response.""" response: httpx.Response - + _options: Optional[FinalRequestOptions] = None _decoder: SSEBytesDecoder def __init__( @@ -31,10 +32,12 @@ def __init__( cast_to: type[_T], response: httpx.Response, client: ImageKit, + options: Optional[FinalRequestOptions] = None, ) -> None: self.response = response self._cast_to = cast_to self._client = client + self._options = options self._decoder = client._make_sse_decoder() self._iterator = self.__stream__() @@ -85,7 +88,7 @@ class AsyncStream(Generic[_T]): """Provides the core interface to iterate over an asynchronous stream response.""" response: httpx.Response - + _options: Optional[FinalRequestOptions] = None _decoder: SSEDecoder | SSEBytesDecoder def __init__( @@ -94,10 +97,12 @@ def __init__( cast_to: type[_T], response: httpx.Response, client: AsyncImageKit, + options: Optional[FinalRequestOptions] = None, ) -> None: self.response = response self._cast_to = cast_to self._client = client + self._options = options self._decoder = client._make_sse_decoder() self._iterator = self.__stream__() From f7c44652ef95cfa1aefef380d280036158519007 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 14:06:48 +0000 Subject: [PATCH 07/19] chore(dependencies): require standardwebhooks 1.0.1 this release includes an important bug fix. --- pyproject.toml | 2 +- requirements-dev.lock | 2 +- requirements.lock | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index cebe3c9..546260a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ Repository = "https://github.com/imagekit-developer/imagekit-python" [project.optional-dependencies] aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"] -webhooks = ["standardwebhooks"] +webhooks = ["standardwebhooks >= 1.0.1, < 2"] [tool.rye] managed = true diff --git a/requirements-dev.lock b/requirements-dev.lock index d03c1bf..d6f308b 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -125,7 +125,7 @@ six==1.17.0 # via python-dateutil sniffio==1.3.1 # via imagekitio -standardwebhooks==1.0.0 +standardwebhooks==1.0.1 # via imagekitio time-machine==2.19.0 tomli==2.4.0 diff --git a/requirements.lock b/requirements.lock index bea99bb..842e1d8 100644 --- a/requirements.lock +++ b/requirements.lock @@ -69,7 +69,7 @@ six==1.17.0 # via python-dateutil sniffio==1.3.1 # via imagekitio -standardwebhooks==1.0.0 +standardwebhooks==1.0.1 # via imagekitio types-deprecated==1.3.1.20251101 # via standardwebhooks From 821dd3f61db9b2be3297dc1b8a9e63d257df9ed1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 20:27:33 +0000 Subject: [PATCH 08/19] chore(internal): make `test_proxy_environment_variables` more resilient --- tests/test_client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_client.py b/tests/test_client.py index 8fef2fd..6a7cb84 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1035,6 +1035,8 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly monkeypatch.setenv("HTTPS_PROXY", "https://example.org") + # Delete in case our environment has this set + monkeypatch.delenv("HTTP_PROXY", raising=False) client = DefaultHttpxClient() @@ -2024,6 +2026,8 @@ async def test_get_platform(self) -> None: async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly monkeypatch.setenv("HTTPS_PROXY", "https://example.org") + # Delete in case our environment has this set + monkeypatch.delenv("HTTP_PROXY", raising=False) client = DefaultAsyncHttpxClient() From 487887eb0e4c405c0f8294e6a82ef6c7a2187c5c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 17:42:23 +0000 Subject: [PATCH 09/19] chore(internal): make `test_proxy_environment_variables` more resilient to env --- tests/test_client.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/test_client.py b/tests/test_client.py index 6a7cb84..f83236d 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1035,8 +1035,14 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly monkeypatch.setenv("HTTPS_PROXY", "https://example.org") - # Delete in case our environment has this set + # Delete in case our environment has any proxy env vars set monkeypatch.delenv("HTTP_PROXY", raising=False) + monkeypatch.delenv("ALL_PROXY", raising=False) + monkeypatch.delenv("NO_PROXY", raising=False) + monkeypatch.delenv("http_proxy", raising=False) + monkeypatch.delenv("https_proxy", raising=False) + monkeypatch.delenv("all_proxy", raising=False) + monkeypatch.delenv("no_proxy", raising=False) client = DefaultHttpxClient() @@ -2026,8 +2032,14 @@ async def test_get_platform(self) -> None: async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly monkeypatch.setenv("HTTPS_PROXY", "https://example.org") - # Delete in case our environment has this set + # Delete in case our environment has any proxy env vars set monkeypatch.delenv("HTTP_PROXY", raising=False) + monkeypatch.delenv("ALL_PROXY", raising=False) + monkeypatch.delenv("NO_PROXY", raising=False) + monkeypatch.delenv("http_proxy", raising=False) + monkeypatch.delenv("https_proxy", raising=False) + monkeypatch.delenv("all_proxy", raising=False) + monkeypatch.delenv("no_proxy", raising=False) client = DefaultAsyncHttpxClient() From 39d38dbd0ca1e81dc84771e6a98a629f90e8dba9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Feb 2026 11:23:58 +0000 Subject: [PATCH 10/19] feat(api): dpr type update --- .stats.yml | 4 ++-- src/imagekitio/resources/beta/v2/files.py | 18 ++++++++++-------- src/imagekitio/resources/files/files.py | 18 ++++++++++-------- src/imagekitio/types/shared/transformation.py | 2 +- .../types/shared_params/transformation.py | 2 +- 5 files changed, 24 insertions(+), 20 deletions(-) diff --git a/.stats.yml b/.stats.yml index 94357b3..e9bf578 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 48 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-13fc3d7cafdea492f62eef7c1d63424d6d9d8adbff74b9f6ca6fd3fc12a36840.yml -openapi_spec_hash: a1fe6fa48207791657a1ea2d60a6dfcc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-e5b5a158784fff63311ceef956e8d5ce9e87c6b557d23ab737270040eb39adcd.yml +openapi_spec_hash: b0293985a8806f367319af573d1b418c config_hash: 47cb702ee2cb52c58d803ae39ade9b44 diff --git a/src/imagekitio/resources/beta/v2/files.py b/src/imagekitio/resources/beta/v2/files.py index 03b198f..c2d7475 100644 --- a/src/imagekitio/resources/beta/v2/files.py +++ b/src/imagekitio/resources/beta/v2/files.py @@ -111,10 +111,11 @@ def upload( about how to implement secure client-side file upload. **File size limit** \\ - On the free plan, the maximum upload file sizes are 20MB for images, audio, and raw - files, and 100MB for videos. On the paid plan, these limits increase to 40MB for - images, audio, and raw files, and 2GB for videos. These limits can be further increased - with higher-tier plans. + On the free plan, the maximum upload file sizes are 25MB for images, audio, and raw + files, and 100MB for videos. On the Lite paid plan, these limits increase to 40MB + for images, audio, and raw files and 300MB for videos, whereas on the Pro paid plan, + these limits increase to 50MB for images, audio, and raw files and 2GB for videos. + These limits can be further increased with enterprise plans. **Version limit** \\ A file can have a maximum of 100 versions. @@ -365,10 +366,11 @@ async def upload( about how to implement secure client-side file upload. **File size limit** \\ - On the free plan, the maximum upload file sizes are 20MB for images, audio, and raw - files, and 100MB for videos. On the paid plan, these limits increase to 40MB for - images, audio, and raw files, and 2GB for videos. These limits can be further increased - with higher-tier plans. + On the free plan, the maximum upload file sizes are 25MB for images, audio, and raw + files, and 100MB for videos. On the Lite paid plan, these limits increase to 40MB + for images, audio, and raw files and 300MB for videos, whereas on the Pro paid plan, + these limits increase to 50MB for images, audio, and raw files and 2GB for videos. + These limits can be further increased with enterprise plans. **Version limit** \\ A file can have a maximum of 100 versions. diff --git a/src/imagekitio/resources/files/files.py b/src/imagekitio/resources/files/files.py index cd9ff3e..47d773c 100644 --- a/src/imagekitio/resources/files/files.py +++ b/src/imagekitio/resources/files/files.py @@ -541,10 +541,11 @@ def upload( by verifying the entire payload using JWT. **File size limit** \\ - On the free plan, the maximum upload file sizes are 20MB for images, audio, and raw - files and 100MB for videos. On the paid plan, these limits increase to 40MB for images, - audio, and raw files and 2GB for videos. These limits can be further increased with - higher-tier plans. + On the free plan, the maximum upload file sizes are 25MB for images, audio, and raw + files and 100MB for videos. On the Lite paid plan, these limits increase to 40MB + for images, audio, and raw files and 300MB for videos, whereas on the Pro paid plan, + these limits increase to 50MB for images, audio, and raw files and 2GB for videos. + These limits can be further increased with enterprise plans. **Version limit** \\ A file can have a maximum of 100 versions. @@ -1214,10 +1215,11 @@ async def upload( by verifying the entire payload using JWT. **File size limit** \\ - On the free plan, the maximum upload file sizes are 20MB for images, audio, and raw - files and 100MB for videos. On the paid plan, these limits increase to 40MB for images, - audio, and raw files and 2GB for videos. These limits can be further increased with - higher-tier plans. + On the free plan, the maximum upload file sizes are 25MB for images, audio, and raw + files and 100MB for videos. On the Lite paid plan, these limits increase to 40MB + for images, audio, and raw files and 300MB for videos, whereas on the Pro paid plan, + these limits increase to 50MB for images, audio, and raw files and 2GB for videos. + These limits can be further increased with enterprise plans. **Version limit** \\ A file can have a maximum of 100 versions. diff --git a/src/imagekitio/types/shared/transformation.py b/src/imagekitio/types/shared/transformation.py index 89b5841..e097cb1 100644 --- a/src/imagekitio/types/shared/transformation.py +++ b/src/imagekitio/types/shared/transformation.py @@ -191,7 +191,7 @@ class Transformation(BaseModel): [Distort effect](https://imagekit.io/docs/effects-and-enhancements#distort---e-distort). """ - dpr: Optional[float] = None + dpr: Union[float, str, None] = None """ Accepts values between 0.1 and 5, or `auto` for automatic device pixel ratio (DPR) calculation. Also accepts arithmetic expressions. diff --git a/src/imagekitio/types/shared_params/transformation.py b/src/imagekitio/types/shared_params/transformation.py index 77c317a..f4ef9f5 100644 --- a/src/imagekitio/types/shared_params/transformation.py +++ b/src/imagekitio/types/shared_params/transformation.py @@ -189,7 +189,7 @@ class Transformation(TypedDict, total=False): [Distort effect](https://imagekit.io/docs/effects-and-enhancements#distort---e-distort). """ - dpr: float + dpr: Union[float, str] """ Accepts values between 0.1 and 5, or `auto` for automatic device pixel ratio (DPR) calculation. Also accepts arithmetic expressions. From d94ada85d3c70d8f896fe276d73afd6c3fb17326 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 00:26:44 +0000 Subject: [PATCH 11/19] chore(tests): update webhook tests --- tests/api_resources/test_webhooks.py | 44 +++++++++++++++++++++------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/tests/api_resources/test_webhooks.py b/tests/api_resources/test_webhooks.py index 35fbbd1..bdde128 100644 --- a/tests/api_resources/test_webhooks.py +++ b/tests/api_resources/test_webhooks.py @@ -16,9 +16,20 @@ class TestWebhooks: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - def test_method_unwrap(self, client: ImageKit) -> None: - key = b"secret" - hook = standardwebhooks.Webhook(key) + @pytest.mark.parametrize( + "client_opt,method_opt", + [ + ("whsec_c2VjcmV0Cg==", None), + ("wrong", b"secret\n"), + ("wrong", "whsec_c2VjcmV0Cg=="), + (None, b"secret\n"), + (None, "whsec_c2VjcmV0Cg=="), + ], + ) + def test_method_unwrap(self, client: ImageKit, client_opt: str | None, method_opt: str | bytes | None) -> None: + hook = standardwebhooks.Webhook(b"secret\n") + + client = client.with_options(webhook_secret=client_opt) data = """{"id":"id","type":"video.transformation.accepted","created_at":"2019-12-27T18:11:19.117Z","data":{"asset":{"url":"https://example.com"},"transformation":{"type":"video-transformation","options":{"audio_codec":"aac","auto_rotate":true,"format":"mp4","quality":0,"stream_protocol":"HLS","variants":["string"],"video_codec":"h264"}}},"request":{"url":"https://example.com","x_request_id":"x_request_id","user_agent":"user_agent"}}""" msg_id = "1" @@ -31,7 +42,7 @@ def test_method_unwrap(self, client: ImageKit) -> None: } try: - _ = client.webhooks.unwrap(data, headers=headers, key=key) + _ = client.webhooks.unwrap(data, headers=headers, key=method_opt) except standardwebhooks.WebhookVerificationError as e: raise AssertionError("Failed to unwrap valid webhook") from e @@ -42,7 +53,7 @@ def test_method_unwrap(self, client: ImageKit) -> None: ] for bad_header in bad_headers: with pytest.raises(standardwebhooks.WebhookVerificationError): - _ = client.webhooks.unwrap(data, headers=bad_header, key=key) + _ = client.webhooks.unwrap(data, headers=bad_header, key=method_opt) class TestAsyncWebhooks: @@ -50,9 +61,22 @@ class TestAsyncWebhooks: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) - def test_method_unwrap(self, client: ImageKit) -> None: - key = b"secret" - hook = standardwebhooks.Webhook(key) + @pytest.mark.parametrize( + "client_opt,method_opt", + [ + ("whsec_c2VjcmV0Cg==", None), + ("wrong", b"secret\n"), + ("wrong", "whsec_c2VjcmV0Cg=="), + (None, b"secret\n"), + (None, "whsec_c2VjcmV0Cg=="), + ], + ) + def test_method_unwrap( + self, async_client: ImageKit, client_opt: str | None, method_opt: str | bytes | None + ) -> None: + hook = standardwebhooks.Webhook(b"secret\n") + + async_client = async_client.with_options(webhook_secret=client_opt) data = """{"id":"id","type":"video.transformation.accepted","created_at":"2019-12-27T18:11:19.117Z","data":{"asset":{"url":"https://example.com"},"transformation":{"type":"video-transformation","options":{"audio_codec":"aac","auto_rotate":true,"format":"mp4","quality":0,"stream_protocol":"HLS","variants":["string"],"video_codec":"h264"}}},"request":{"url":"https://example.com","x_request_id":"x_request_id","user_agent":"user_agent"}}""" msg_id = "1" @@ -65,7 +89,7 @@ def test_method_unwrap(self, client: ImageKit) -> None: } try: - _ = client.webhooks.unwrap(data, headers=headers, key=key) + _ = async_client.webhooks.unwrap(data, headers=headers, key=method_opt) except standardwebhooks.WebhookVerificationError as e: raise AssertionError("Failed to unwrap valid webhook") from e @@ -76,4 +100,4 @@ def test_method_unwrap(self, client: ImageKit) -> None: ] for bad_header in bad_headers: with pytest.raises(standardwebhooks.WebhookVerificationError): - _ = client.webhooks.unwrap(data, headers=bad_header, key=key) + _ = async_client.webhooks.unwrap(data, headers=bad_header, key=method_opt) From 73012764930ba8b461f98bbfd0349b395e46a7a4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 03:18:32 +0000 Subject: [PATCH 12/19] feat(api): revert dpr breaking change --- .stats.yml | 4 ++-- src/imagekitio/types/shared/transformation.py | 2 +- src/imagekitio/types/shared_params/transformation.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index e9bf578..2ab3dbf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 48 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-e5b5a158784fff63311ceef956e8d5ce9e87c6b557d23ab737270040eb39adcd.yml -openapi_spec_hash: b0293985a8806f367319af573d1b418c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-83a7f3659a437113f2a79e1e72794be19eff00ec232fd0206198c80364ccfebf.yml +openapi_spec_hash: b327552548ab641eb4ea3b45e643dfce config_hash: 47cb702ee2cb52c58d803ae39ade9b44 diff --git a/src/imagekitio/types/shared/transformation.py b/src/imagekitio/types/shared/transformation.py index e097cb1..89b5841 100644 --- a/src/imagekitio/types/shared/transformation.py +++ b/src/imagekitio/types/shared/transformation.py @@ -191,7 +191,7 @@ class Transformation(BaseModel): [Distort effect](https://imagekit.io/docs/effects-and-enhancements#distort---e-distort). """ - dpr: Union[float, str, None] = None + dpr: Optional[float] = None """ Accepts values between 0.1 and 5, or `auto` for automatic device pixel ratio (DPR) calculation. Also accepts arithmetic expressions. diff --git a/src/imagekitio/types/shared_params/transformation.py b/src/imagekitio/types/shared_params/transformation.py index f4ef9f5..77c317a 100644 --- a/src/imagekitio/types/shared_params/transformation.py +++ b/src/imagekitio/types/shared_params/transformation.py @@ -189,7 +189,7 @@ class Transformation(TypedDict, total=False): [Distort effect](https://imagekit.io/docs/effects-and-enhancements#distort---e-distort). """ - dpr: Union[float, str] + dpr: float """ Accepts values between 0.1 and 5, or `auto` for automatic device pixel ratio (DPR) calculation. Also accepts arithmetic expressions. From 15805f5e6b642f0cebfbc8131f99f886e8e72e99 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 7 Mar 2026 13:01:22 +0000 Subject: [PATCH 13/19] chore(ci): skip uploading artifacts on stainless-internal branches --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index facd5ed..98f5be4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,14 +61,18 @@ jobs: run: rye build - name: Get GitHub OIDC Token - if: github.repository == 'stainless-sdks/imagekit-python' + if: |- + github.repository == 'stainless-sdks/imagekit-python' && + !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc uses: actions/github-script@v8 with: script: core.setOutput('github_token', await core.getIDToken()); - name: Upload tarball - if: github.repository == 'stainless-sdks/imagekit-python' + if: |- + github.repository == 'stainless-sdks/imagekit-python' && + !startsWith(github.ref, 'refs/heads/stl/') env: URL: https://pkg.stainless.com/s AUTH: ${{ steps.github-oidc.outputs.github_token }} From d06cdca52df17c23df1d9cd8a468b8184bde219a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 21 Mar 2026 11:34:00 +0000 Subject: [PATCH 14/19] chore: update placeholder string --- tests/api_resources/beta/v2/test_files.py | 16 ++++++++-------- tests/api_resources/test_files.py | 16 ++++++++-------- tests/test_client.py | 20 ++++++++++---------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/tests/api_resources/beta/v2/test_files.py b/tests/api_resources/beta/v2/test_files.py index 619f283..5ddc19e 100644 --- a/tests/api_resources/beta/v2/test_files.py +++ b/tests/api_resources/beta/v2/test_files.py @@ -21,7 +21,7 @@ class TestFiles: @parametrize def test_method_upload(self, client: ImageKit) -> None: file = client.beta.v2.files.upload( - file=b"raw file contents", + file=b"Example data", file_name="fileName", ) assert_matches_type(FileUploadResponse, file, path=["response"]) @@ -30,7 +30,7 @@ def test_method_upload(self, client: ImageKit) -> None: @parametrize def test_method_upload_with_all_params(self, client: ImageKit) -> None: file = client.beta.v2.files.upload( - file=b"raw file contents", + file=b"Example data", file_name="fileName", token="token", checks='"request.folder" : "marketing/"\n', @@ -142,7 +142,7 @@ def test_method_upload_with_all_params(self, client: ImageKit) -> None: @parametrize def test_raw_response_upload(self, client: ImageKit) -> None: response = client.beta.v2.files.with_raw_response.upload( - file=b"raw file contents", + file=b"Example data", file_name="fileName", ) @@ -155,7 +155,7 @@ def test_raw_response_upload(self, client: ImageKit) -> None: @parametrize def test_streaming_response_upload(self, client: ImageKit) -> None: with client.beta.v2.files.with_streaming_response.upload( - file=b"raw file contents", + file=b"Example data", file_name="fileName", ) as response: assert not response.is_closed @@ -176,7 +176,7 @@ class TestAsyncFiles: @parametrize async def test_method_upload(self, async_client: AsyncImageKit) -> None: file = await async_client.beta.v2.files.upload( - file=b"raw file contents", + file=b"Example data", file_name="fileName", ) assert_matches_type(FileUploadResponse, file, path=["response"]) @@ -185,7 +185,7 @@ async def test_method_upload(self, async_client: AsyncImageKit) -> None: @parametrize async def test_method_upload_with_all_params(self, async_client: AsyncImageKit) -> None: file = await async_client.beta.v2.files.upload( - file=b"raw file contents", + file=b"Example data", file_name="fileName", token="token", checks='"request.folder" : "marketing/"\n', @@ -297,7 +297,7 @@ async def test_method_upload_with_all_params(self, async_client: AsyncImageKit) @parametrize async def test_raw_response_upload(self, async_client: AsyncImageKit) -> None: response = await async_client.beta.v2.files.with_raw_response.upload( - file=b"raw file contents", + file=b"Example data", file_name="fileName", ) @@ -310,7 +310,7 @@ async def test_raw_response_upload(self, async_client: AsyncImageKit) -> None: @parametrize async def test_streaming_response_upload(self, async_client: AsyncImageKit) -> None: async with async_client.beta.v2.files.with_streaming_response.upload( - file=b"raw file contents", + file=b"Example data", file_name="fileName", ) as response: assert not response.is_closed diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py index f4e3b02..0f6cdc4 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -423,7 +423,7 @@ def test_streaming_response_rename(self, client: ImageKit) -> None: @parametrize def test_method_upload(self, client: ImageKit) -> None: file = client.files.upload( - file=b"raw file contents", + file=b"Example data", file_name="fileName", ) assert_matches_type(FileUploadResponse, file, path=["response"]) @@ -432,7 +432,7 @@ def test_method_upload(self, client: ImageKit) -> None: @parametrize def test_method_upload_with_all_params(self, client: ImageKit) -> None: file = client.files.upload( - file=b"raw file contents", + file=b"Example data", file_name="fileName", token="token", checks='"request.folder" : "marketing/"\n', @@ -547,7 +547,7 @@ def test_method_upload_with_all_params(self, client: ImageKit) -> None: @parametrize def test_raw_response_upload(self, client: ImageKit) -> None: response = client.files.with_raw_response.upload( - file=b"raw file contents", + file=b"Example data", file_name="fileName", ) @@ -560,7 +560,7 @@ def test_raw_response_upload(self, client: ImageKit) -> None: @parametrize def test_streaming_response_upload(self, client: ImageKit) -> None: with client.files.with_streaming_response.upload( - file=b"raw file contents", + file=b"Example data", file_name="fileName", ) as response: assert not response.is_closed @@ -976,7 +976,7 @@ async def test_streaming_response_rename(self, async_client: AsyncImageKit) -> N @parametrize async def test_method_upload(self, async_client: AsyncImageKit) -> None: file = await async_client.files.upload( - file=b"raw file contents", + file=b"Example data", file_name="fileName", ) assert_matches_type(FileUploadResponse, file, path=["response"]) @@ -985,7 +985,7 @@ async def test_method_upload(self, async_client: AsyncImageKit) -> None: @parametrize async def test_method_upload_with_all_params(self, async_client: AsyncImageKit) -> None: file = await async_client.files.upload( - file=b"raw file contents", + file=b"Example data", file_name="fileName", token="token", checks='"request.folder" : "marketing/"\n', @@ -1100,7 +1100,7 @@ async def test_method_upload_with_all_params(self, async_client: AsyncImageKit) @parametrize async def test_raw_response_upload(self, async_client: AsyncImageKit) -> None: response = await async_client.files.with_raw_response.upload( - file=b"raw file contents", + file=b"Example data", file_name="fileName", ) @@ -1113,7 +1113,7 @@ async def test_raw_response_upload(self, async_client: AsyncImageKit) -> None: @parametrize async def test_streaming_response_upload(self, async_client: AsyncImageKit) -> None: async with async_client.files.with_streaming_response.upload( - file=b"raw file contents", + file=b"Example data", file_name="fileName", ) as response: assert not response.is_closed diff --git a/tests/test_client.py b/tests/test_client.py index f83236d..00e1367 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -938,7 +938,7 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, clien respx_mock.post("/api/v1/files/upload").mock(side_effect=httpx.TimeoutException("Test timeout error")) with pytest.raises(APITimeoutError): - client.files.with_streaming_response.upload(file=b"raw file contents", file_name="fileName").__enter__() + client.files.with_streaming_response.upload(file=b"Example data", file_name="fileName").__enter__() assert _get_open_connections(client) == 0 @@ -948,7 +948,7 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter, client respx_mock.post("/api/v1/files/upload").mock(return_value=httpx.Response(500)) with pytest.raises(APIStatusError): - client.files.with_streaming_response.upload(file=b"raw file contents", file_name="fileName").__enter__() + client.files.with_streaming_response.upload(file=b"Example data", file_name="fileName").__enter__() assert _get_open_connections(client) == 0 @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) @@ -977,7 +977,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: respx_mock.post("/api/v1/files/upload").mock(side_effect=retry_handler) - response = client.files.with_raw_response.upload(file=b"raw file contents", file_name="fileName") + response = client.files.with_raw_response.upload(file=b"Example data", file_name="fileName") assert response.retries_taken == failures_before_success assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success @@ -1002,7 +1002,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: respx_mock.post("/api/v1/files/upload").mock(side_effect=retry_handler) response = client.files.with_raw_response.upload( - file=b"raw file contents", file_name="fileName", extra_headers={"x-stainless-retry-count": Omit()} + file=b"Example data", file_name="fileName", extra_headers={"x-stainless-retry-count": Omit()} ) assert len(response.http_request.headers.get_list("x-stainless-retry-count")) == 0 @@ -1027,7 +1027,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: respx_mock.post("/api/v1/files/upload").mock(side_effect=retry_handler) response = client.files.with_raw_response.upload( - file=b"raw file contents", file_name="fileName", extra_headers={"x-stainless-retry-count": "42"} + file=b"Example data", file_name="fileName", extra_headers={"x-stainless-retry-count": "42"} ) assert response.http_request.headers.get("x-stainless-retry-count") == "42" @@ -1926,7 +1926,7 @@ async def test_retrying_timeout_errors_doesnt_leak( with pytest.raises(APITimeoutError): await async_client.files.with_streaming_response.upload( - file=b"raw file contents", file_name="fileName" + file=b"Example data", file_name="fileName" ).__aenter__() assert _get_open_connections(async_client) == 0 @@ -1940,7 +1940,7 @@ async def test_retrying_status_errors_doesnt_leak( with pytest.raises(APIStatusError): await async_client.files.with_streaming_response.upload( - file=b"raw file contents", file_name="fileName" + file=b"Example data", file_name="fileName" ).__aenter__() assert _get_open_connections(async_client) == 0 @@ -1970,7 +1970,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: respx_mock.post("/api/v1/files/upload").mock(side_effect=retry_handler) - response = await client.files.with_raw_response.upload(file=b"raw file contents", file_name="fileName") + response = await client.files.with_raw_response.upload(file=b"Example data", file_name="fileName") assert response.retries_taken == failures_before_success assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success @@ -1995,7 +1995,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: respx_mock.post("/api/v1/files/upload").mock(side_effect=retry_handler) response = await client.files.with_raw_response.upload( - file=b"raw file contents", file_name="fileName", extra_headers={"x-stainless-retry-count": Omit()} + file=b"Example data", file_name="fileName", extra_headers={"x-stainless-retry-count": Omit()} ) assert len(response.http_request.headers.get_list("x-stainless-retry-count")) == 0 @@ -2020,7 +2020,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: respx_mock.post("/api/v1/files/upload").mock(side_effect=retry_handler) response = await client.files.with_raw_response.upload( - file=b"raw file contents", file_name="fileName", extra_headers={"x-stainless-retry-count": "42"} + file=b"Example data", file_name="fileName", extra_headers={"x-stainless-retry-count": "42"} ) assert response.http_request.headers.get("x-stainless-retry-count") == "42" From fda01e45e315c192d24a6183cd24fd43cbcb0722 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 17:34:47 +0000 Subject: [PATCH 15/19] fix(pydantic): do not pass `by_alias` unless set --- src/imagekitio/_compat.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/imagekitio/_compat.py b/src/imagekitio/_compat.py index 786ff42..e6690a4 100644 --- a/src/imagekitio/_compat.py +++ b/src/imagekitio/_compat.py @@ -2,7 +2,7 @@ from typing import TYPE_CHECKING, Any, Union, Generic, TypeVar, Callable, cast, overload from datetime import date, datetime -from typing_extensions import Self, Literal +from typing_extensions import Self, Literal, TypedDict import pydantic from pydantic.fields import FieldInfo @@ -131,6 +131,10 @@ def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str: return model.model_dump_json(indent=indent) +class _ModelDumpKwargs(TypedDict, total=False): + by_alias: bool + + def model_dump( model: pydantic.BaseModel, *, @@ -142,6 +146,9 @@ def model_dump( by_alias: bool | None = None, ) -> dict[str, Any]: if (not PYDANTIC_V1) or hasattr(model, "model_dump"): + kwargs: _ModelDumpKwargs = {} + if by_alias is not None: + kwargs["by_alias"] = by_alias return model.model_dump( mode=mode, exclude=exclude, @@ -149,7 +156,7 @@ def model_dump( exclude_defaults=exclude_defaults, # warnings are not supported in Pydantic v1 warnings=True if PYDANTIC_V1 else warnings, - by_alias=by_alias, + **kwargs, ) return cast( "dict[str, Any]", From 393174d253a106393b888aed50f9ca7623c9c06e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 19:03:28 +0000 Subject: [PATCH 16/19] fix(deps): bump minimum typing-extensions version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 546260a..be26513 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ authors = [ dependencies = [ "httpx>=0.23.0, <1", "pydantic>=1.9.0, <3", - "typing-extensions>=4.10, <5", + "typing-extensions>=4.14, <5", "anyio>=3.5.0, <5", "distro>=1.7.0, <2", "sniffio", From 369ff736880f83ac7196411241801fe9b04a7dfb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 20:46:46 +0000 Subject: [PATCH 17/19] chore(internal): tweak CI branches --- .github/workflows/ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98f5be4..2b07bf3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,14 @@ name: CI on: push: - branches-ignore: - - 'generated' - - 'codegen/**' - - 'integrated/**' - - 'stl-preview-head/**' - - 'stl-preview-base/**' + branches: + - '**' + - '!integrated/**' + - '!stl-preview-head/**' + - '!stl-preview-base/**' + - '!generated' + - '!codegen/**' + - 'codegen/stl/**' pull_request: branches-ignore: - 'stl-preview-head/**' From fa1972cd605c2a7a81ad069161cc687d0ec4193d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2026 15:37:41 +0000 Subject: [PATCH 18/19] fix: sanitize endpoint path params --- src/imagekitio/_utils/__init__.py | 1 + src/imagekitio/_utils/_path.py | 127 ++++++++++++++++++ src/imagekitio/resources/accounts/origins.py | 14 +- .../resources/accounts/url_endpoints.py | 14 +- .../resources/cache/invalidation.py | 6 +- .../resources/custom_metadata_fields.py | 10 +- src/imagekitio/resources/files/files.py | 14 +- src/imagekitio/resources/files/metadata.py | 6 +- src/imagekitio/resources/files/versions.py | 17 +-- src/imagekitio/resources/folders/job.py | 5 +- src/imagekitio/resources/saved_extensions.py | 14 +- tests/test_utils/test_path.py | 89 ++++++++++++ 12 files changed, 268 insertions(+), 49 deletions(-) create mode 100644 src/imagekitio/_utils/_path.py create mode 100644 tests/test_utils/test_path.py diff --git a/src/imagekitio/_utils/__init__.py b/src/imagekitio/_utils/__init__.py index dc64e29..10cb66d 100644 --- a/src/imagekitio/_utils/__init__.py +++ b/src/imagekitio/_utils/__init__.py @@ -1,3 +1,4 @@ +from ._path import path_template as path_template from ._sync import asyncify as asyncify from ._proxy import LazyProxy as LazyProxy from ._utils import ( diff --git a/src/imagekitio/_utils/_path.py b/src/imagekitio/_utils/_path.py new file mode 100644 index 0000000..4d6e1e4 --- /dev/null +++ b/src/imagekitio/_utils/_path.py @@ -0,0 +1,127 @@ +from __future__ import annotations + +import re +from typing import ( + Any, + Mapping, + Callable, +) +from urllib.parse import quote + +# Matches '.' or '..' where each dot is either literal or percent-encoded (%2e / %2E). +_DOT_SEGMENT_RE = re.compile(r"^(?:\.|%2[eE]){1,2}$") + +_PLACEHOLDER_RE = re.compile(r"\{(\w+)\}") + + +def _quote_path_segment_part(value: str) -> str: + """Percent-encode `value` for use in a URI path segment. + + Considers characters not in `pchar` set from RFC 3986 §3.3 to be unsafe. + https://datatracker.ietf.org/doc/html/rfc3986#section-3.3 + """ + # quote() already treats unreserved characters (letters, digits, and -._~) + # as safe, so we only need to add sub-delims, ':', and '@'. + # Notably, unlike the default `safe` for quote(), / is unsafe and must be quoted. + return quote(value, safe="!$&'()*+,;=:@") + + +def _quote_query_part(value: str) -> str: + """Percent-encode `value` for use in a URI query string. + + Considers &, = and characters not in `query` set from RFC 3986 §3.4 to be unsafe. + https://datatracker.ietf.org/doc/html/rfc3986#section-3.4 + """ + return quote(value, safe="!$'()*+,;:@/?") + + +def _quote_fragment_part(value: str) -> str: + """Percent-encode `value` for use in a URI fragment. + + Considers characters not in `fragment` set from RFC 3986 §3.5 to be unsafe. + https://datatracker.ietf.org/doc/html/rfc3986#section-3.5 + """ + return quote(value, safe="!$&'()*+,;=:@/?") + + +def _interpolate( + template: str, + values: Mapping[str, Any], + quoter: Callable[[str], str], +) -> str: + """Replace {name} placeholders in `template`, quoting each value with `quoter`. + + Placeholder names are looked up in `values`. + + Raises: + KeyError: If a placeholder is not found in `values`. + """ + # re.split with a capturing group returns alternating + # [text, name, text, name, ..., text] elements. + parts = _PLACEHOLDER_RE.split(template) + + for i in range(1, len(parts), 2): + name = parts[i] + if name not in values: + raise KeyError(f"a value for placeholder {{{name}}} was not provided") + val = values[name] + if val is None: + parts[i] = "null" + elif isinstance(val, bool): + parts[i] = "true" if val else "false" + else: + parts[i] = quoter(str(values[name])) + + return "".join(parts) + + +def path_template(template: str, /, **kwargs: Any) -> str: + """Interpolate {name} placeholders in `template` from keyword arguments. + + Args: + template: The template string containing {name} placeholders. + **kwargs: Keyword arguments to interpolate into the template. + + Returns: + The template with placeholders interpolated and percent-encoded. + + Safe characters for percent-encoding are dependent on the URI component. + Placeholders in path and fragment portions are percent-encoded where the `segment` + and `fragment` sets from RFC 3986 respectively are considered safe. + Placeholders in the query portion are percent-encoded where the `query` set from + RFC 3986 §3.3 is considered safe except for = and & characters. + + Raises: + KeyError: If a placeholder is not found in `kwargs`. + ValueError: If resulting path contains /./ or /../ segments (including percent-encoded dot-segments). + """ + # Split the template into path, query, and fragment portions. + fragment_template: str | None = None + query_template: str | None = None + + rest = template + if "#" in rest: + rest, fragment_template = rest.split("#", 1) + if "?" in rest: + rest, query_template = rest.split("?", 1) + path_template = rest + + # Interpolate each portion with the appropriate quoting rules. + path_result = _interpolate(path_template, kwargs, _quote_path_segment_part) + + # Reject dot-segments (. and ..) in the final assembled path. The check + # runs after interpolation so that adjacent placeholders or a mix of static + # text and placeholders that together form a dot-segment are caught. + # Also reject percent-encoded dot-segments to protect against incorrectly + # implemented normalization in servers/proxies. + for segment in path_result.split("/"): + if _DOT_SEGMENT_RE.match(segment): + raise ValueError(f"Constructed path {path_result!r} contains dot-segment {segment!r} which is not allowed") + + result = path_result + if query_template is not None: + result += "?" + _interpolate(query_template, kwargs, _quote_query_part) + if fragment_template is not None: + result += "#" + _interpolate(fragment_template, kwargs, _quote_fragment_part) + + return result diff --git a/src/imagekitio/resources/accounts/origins.py b/src/imagekitio/resources/accounts/origins.py index 27dc7af..1bd4b50 100644 --- a/src/imagekitio/resources/accounts/origins.py +++ b/src/imagekitio/resources/accounts/origins.py @@ -8,7 +8,7 @@ import httpx from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given -from ..._utils import required_args, maybe_transform, async_maybe_transform +from ..._utils import path_template, required_args, maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -948,7 +948,7 @@ def update( return cast( OriginResponse, self._put( - f"/v1/accounts/origins/{id}", + path_template("/v1/accounts/origins/{id}", id=id), body=maybe_transform( { "access_key": access_key, @@ -1038,7 +1038,7 @@ def delete( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") extra_headers = {"Accept": "*/*", **(extra_headers or {})} return self._delete( - f"/v1/accounts/origins/{id}", + path_template("/v1/accounts/origins/{id}", id=id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -1078,7 +1078,7 @@ def get( return cast( OriginResponse, self._get( - f"/v1/accounts/origins/{id}", + path_template("/v1/accounts/origins/{id}", id=id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -2010,7 +2010,7 @@ async def update( return cast( OriginResponse, await self._put( - f"/v1/accounts/origins/{id}", + path_template("/v1/accounts/origins/{id}", id=id), body=await async_maybe_transform( { "access_key": access_key, @@ -2100,7 +2100,7 @@ async def delete( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") extra_headers = {"Accept": "*/*", **(extra_headers or {})} return await self._delete( - f"/v1/accounts/origins/{id}", + path_template("/v1/accounts/origins/{id}", id=id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -2140,7 +2140,7 @@ async def get( return cast( OriginResponse, await self._get( - f"/v1/accounts/origins/{id}", + path_template("/v1/accounts/origins/{id}", id=id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/imagekitio/resources/accounts/url_endpoints.py b/src/imagekitio/resources/accounts/url_endpoints.py index ab8d422..9e0a665 100644 --- a/src/imagekitio/resources/accounts/url_endpoints.py +++ b/src/imagekitio/resources/accounts/url_endpoints.py @@ -5,7 +5,7 @@ import httpx from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given -from ..._utils import maybe_transform, async_maybe_transform +from ..._utils import path_template, maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -145,7 +145,7 @@ def update( if not id: raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return self._put( - f"/v1/accounts/url-endpoints/{id}", + path_template("/v1/accounts/url-endpoints/{id}", id=id), body=maybe_transform( { "description": description, @@ -219,7 +219,7 @@ def delete( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") extra_headers = {"Accept": "*/*", **(extra_headers or {})} return self._delete( - f"/v1/accounts/url-endpoints/{id}", + path_template("/v1/accounts/url-endpoints/{id}", id=id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -258,7 +258,7 @@ def get( if not id: raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return self._get( - f"/v1/accounts/url-endpoints/{id}", + path_template("/v1/accounts/url-endpoints/{id}", id=id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -389,7 +389,7 @@ async def update( if not id: raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return await self._put( - f"/v1/accounts/url-endpoints/{id}", + path_template("/v1/accounts/url-endpoints/{id}", id=id), body=await async_maybe_transform( { "description": description, @@ -463,7 +463,7 @@ async def delete( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") extra_headers = {"Accept": "*/*", **(extra_headers or {})} return await self._delete( - f"/v1/accounts/url-endpoints/{id}", + path_template("/v1/accounts/url-endpoints/{id}", id=id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -502,7 +502,7 @@ async def get( if not id: raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return await self._get( - f"/v1/accounts/url-endpoints/{id}", + path_template("/v1/accounts/url-endpoints/{id}", id=id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/imagekitio/resources/cache/invalidation.py b/src/imagekitio/resources/cache/invalidation.py index 9c95dc8..d743a95 100644 --- a/src/imagekitio/resources/cache/invalidation.py +++ b/src/imagekitio/resources/cache/invalidation.py @@ -5,7 +5,7 @@ import httpx from ..._types import Body, Query, Headers, NotGiven, not_given -from ..._utils import maybe_transform, async_maybe_transform +from ..._utils import path_template, maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -105,7 +105,7 @@ def get( if not request_id: raise ValueError(f"Expected a non-empty value for `request_id` but received {request_id!r}") return self._get( - f"/v1/files/purge/{request_id}", + path_template("/v1/files/purge/{request_id}", request_id=request_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -196,7 +196,7 @@ async def get( if not request_id: raise ValueError(f"Expected a non-empty value for `request_id` but received {request_id!r}") return await self._get( - f"/v1/files/purge/{request_id}", + path_template("/v1/files/purge/{request_id}", request_id=request_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/imagekitio/resources/custom_metadata_fields.py b/src/imagekitio/resources/custom_metadata_fields.py index 467e52a..7455316 100644 --- a/src/imagekitio/resources/custom_metadata_fields.py +++ b/src/imagekitio/resources/custom_metadata_fields.py @@ -10,7 +10,7 @@ custom_metadata_field_update_params, ) from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -138,7 +138,7 @@ def update( if not id: raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return self._patch( - f"/v1/customMetadataFields/{id}", + path_template("/v1/customMetadataFields/{id}", id=id), body=maybe_transform( { "label": label, @@ -237,7 +237,7 @@ def delete( if not id: raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return self._delete( - f"/v1/customMetadataFields/{id}", + path_template("/v1/customMetadataFields/{id}", id=id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -356,7 +356,7 @@ async def update( if not id: raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return await self._patch( - f"/v1/customMetadataFields/{id}", + path_template("/v1/customMetadataFields/{id}", id=id), body=await async_maybe_transform( { "label": label, @@ -455,7 +455,7 @@ async def delete( if not id: raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return await self._delete( - f"/v1/customMetadataFields/{id}", + path_template("/v1/customMetadataFields/{id}", id=id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/imagekitio/resources/files/files.py b/src/imagekitio/resources/files/files.py index 47d773c..f100314 100644 --- a/src/imagekitio/resources/files/files.py +++ b/src/imagekitio/resources/files/files.py @@ -34,7 +34,7 @@ omit, not_given, ) -from ..._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform +from ..._utils import extract_files, path_template, maybe_transform, deepcopy_minimal, async_maybe_transform from .metadata import ( MetadataResource, AsyncMetadataResource, @@ -221,7 +221,7 @@ def update( if not file_id: raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}") return self._patch( - f"/v1/files/{file_id}/details", + path_template("/v1/files/{file_id}/details", file_id=file_id), body=maybe_transform( { "custom_coordinates": custom_coordinates, @@ -272,7 +272,7 @@ def delete( raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}") extra_headers = {"Accept": "*/*", **(extra_headers or {})} return self._delete( - f"/v1/files/{file_id}", + path_template("/v1/files/{file_id}", file_id=file_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -359,7 +359,7 @@ def get( if not file_id: raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}") return self._get( - f"/v1/files/{file_id}/details", + path_template("/v1/files/{file_id}/details", file_id=file_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -895,7 +895,7 @@ async def update( if not file_id: raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}") return await self._patch( - f"/v1/files/{file_id}/details", + path_template("/v1/files/{file_id}/details", file_id=file_id), body=await async_maybe_transform( { "custom_coordinates": custom_coordinates, @@ -946,7 +946,7 @@ async def delete( raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}") extra_headers = {"Accept": "*/*", **(extra_headers or {})} return await self._delete( - f"/v1/files/{file_id}", + path_template("/v1/files/{file_id}", file_id=file_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -1033,7 +1033,7 @@ async def get( if not file_id: raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}") return await self._get( - f"/v1/files/{file_id}/details", + path_template("/v1/files/{file_id}/details", file_id=file_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/imagekitio/resources/files/metadata.py b/src/imagekitio/resources/files/metadata.py index 071a1e9..cb900fe 100644 --- a/src/imagekitio/resources/files/metadata.py +++ b/src/imagekitio/resources/files/metadata.py @@ -5,7 +5,7 @@ import httpx from ..._types import Body, Query, Headers, NotGiven, not_given -from ..._utils import maybe_transform, async_maybe_transform +from ..._utils import path_template, maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -71,7 +71,7 @@ def get( if not file_id: raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}") return self._get( - f"/v1/files/{file_id}/metadata", + path_template("/v1/files/{file_id}/metadata", file_id=file_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -168,7 +168,7 @@ async def get( if not file_id: raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}") return await self._get( - f"/v1/files/{file_id}/metadata", + path_template("/v1/files/{file_id}/metadata", file_id=file_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/imagekitio/resources/files/versions.py b/src/imagekitio/resources/files/versions.py index e6479e1..3301fbc 100644 --- a/src/imagekitio/resources/files/versions.py +++ b/src/imagekitio/resources/files/versions.py @@ -5,6 +5,7 @@ import httpx from ..._types import Body, Query, Headers, NotGiven, not_given +from ..._utils import path_template from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -67,7 +68,7 @@ def list( if not file_id: raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}") return self._get( - f"/v1/files/{file_id}/versions", + path_template("/v1/files/{file_id}/versions", file_id=file_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -107,7 +108,7 @@ def delete( if not version_id: raise ValueError(f"Expected a non-empty value for `version_id` but received {version_id!r}") return self._delete( - f"/v1/files/{file_id}/versions/{version_id}", + path_template("/v1/files/{file_id}/versions/{version_id}", file_id=file_id, version_id=version_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -143,7 +144,7 @@ def get( if not version_id: raise ValueError(f"Expected a non-empty value for `version_id` but received {version_id!r}") return self._get( - f"/v1/files/{file_id}/versions/{version_id}", + path_template("/v1/files/{file_id}/versions/{version_id}", file_id=file_id, version_id=version_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -179,7 +180,7 @@ def restore( if not version_id: raise ValueError(f"Expected a non-empty value for `version_id` but received {version_id!r}") return self._put( - f"/v1/files/{file_id}/versions/{version_id}/restore", + path_template("/v1/files/{file_id}/versions/{version_id}/restore", file_id=file_id, version_id=version_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -233,7 +234,7 @@ async def list( if not file_id: raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}") return await self._get( - f"/v1/files/{file_id}/versions", + path_template("/v1/files/{file_id}/versions", file_id=file_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -273,7 +274,7 @@ async def delete( if not version_id: raise ValueError(f"Expected a non-empty value for `version_id` but received {version_id!r}") return await self._delete( - f"/v1/files/{file_id}/versions/{version_id}", + path_template("/v1/files/{file_id}/versions/{version_id}", file_id=file_id, version_id=version_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -309,7 +310,7 @@ async def get( if not version_id: raise ValueError(f"Expected a non-empty value for `version_id` but received {version_id!r}") return await self._get( - f"/v1/files/{file_id}/versions/{version_id}", + path_template("/v1/files/{file_id}/versions/{version_id}", file_id=file_id, version_id=version_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -345,7 +346,7 @@ async def restore( if not version_id: raise ValueError(f"Expected a non-empty value for `version_id` but received {version_id!r}") return await self._put( - f"/v1/files/{file_id}/versions/{version_id}/restore", + path_template("/v1/files/{file_id}/versions/{version_id}/restore", file_id=file_id, version_id=version_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/imagekitio/resources/folders/job.py b/src/imagekitio/resources/folders/job.py index 5ccbd3b..140a062 100644 --- a/src/imagekitio/resources/folders/job.py +++ b/src/imagekitio/resources/folders/job.py @@ -5,6 +5,7 @@ import httpx from ..._types import Body, Query, Headers, NotGiven, not_given +from ..._utils import path_template from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -65,7 +66,7 @@ def get( if not job_id: raise ValueError(f"Expected a non-empty value for `job_id` but received {job_id!r}") return self._get( - f"/v1/bulkJobs/{job_id}", + path_template("/v1/bulkJobs/{job_id}", job_id=job_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -119,7 +120,7 @@ async def get( if not job_id: raise ValueError(f"Expected a non-empty value for `job_id` but received {job_id!r}") return await self._get( - f"/v1/bulkJobs/{job_id}", + path_template("/v1/bulkJobs/{job_id}", job_id=job_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/imagekitio/resources/saved_extensions.py b/src/imagekitio/resources/saved_extensions.py index e8a6f10..1fc30cf 100644 --- a/src/imagekitio/resources/saved_extensions.py +++ b/src/imagekitio/resources/saved_extensions.py @@ -6,7 +6,7 @@ from ..types import saved_extension_create_params, saved_extension_update_params from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -135,7 +135,7 @@ def update( if not id: raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return self._patch( - f"/v1/saved-extensions/{id}", + path_template("/v1/saved-extensions/{id}", id=id), body=maybe_transform( { "config": config, @@ -201,7 +201,7 @@ def delete( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") extra_headers = {"Accept": "*/*", **(extra_headers or {})} return self._delete( - f"/v1/saved-extensions/{id}", + path_template("/v1/saved-extensions/{id}", id=id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -234,7 +234,7 @@ def get( if not id: raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return self._get( - f"/v1/saved-extensions/{id}", + path_template("/v1/saved-extensions/{id}", id=id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -354,7 +354,7 @@ async def update( if not id: raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return await self._patch( - f"/v1/saved-extensions/{id}", + path_template("/v1/saved-extensions/{id}", id=id), body=await async_maybe_transform( { "config": config, @@ -420,7 +420,7 @@ async def delete( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") extra_headers = {"Accept": "*/*", **(extra_headers or {})} return await self._delete( - f"/v1/saved-extensions/{id}", + path_template("/v1/saved-extensions/{id}", id=id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -453,7 +453,7 @@ async def get( if not id: raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return await self._get( - f"/v1/saved-extensions/{id}", + path_template("/v1/saved-extensions/{id}", id=id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/tests/test_utils/test_path.py b/tests/test_utils/test_path.py new file mode 100644 index 0000000..ba39c76 --- /dev/null +++ b/tests/test_utils/test_path.py @@ -0,0 +1,89 @@ +from __future__ import annotations + +from typing import Any + +import pytest + +from imagekitio._utils._path import path_template + + +@pytest.mark.parametrize( + "template, kwargs, expected", + [ + ("/v1/{id}", dict(id="abc"), "/v1/abc"), + ("/v1/{a}/{b}", dict(a="x", b="y"), "/v1/x/y"), + ("/v1/{a}{b}/path/{c}?val={d}#{e}", dict(a="x", b="y", c="z", d="u", e="v"), "/v1/xy/path/z?val=u#v"), + ("/{w}/{w}", dict(w="echo"), "/echo/echo"), + ("/v1/static", {}, "/v1/static"), + ("", {}, ""), + ("/v1/?q={n}&count=10", dict(n=42), "/v1/?q=42&count=10"), + ("/v1/{v}", dict(v=None), "/v1/null"), + ("/v1/{v}", dict(v=True), "/v1/true"), + ("/v1/{v}", dict(v=False), "/v1/false"), + ("/v1/{v}", dict(v=".hidden"), "/v1/.hidden"), # dot prefix ok + ("/v1/{v}", dict(v="file.txt"), "/v1/file.txt"), # dot in middle ok + ("/v1/{v}", dict(v="..."), "/v1/..."), # triple dot ok + ("/v1/{a}{b}", dict(a=".", b="txt"), "/v1/.txt"), # dot var combining with adjacent to be ok + ("/items?q={v}#{f}", dict(v=".", f=".."), "/items?q=.#.."), # dots in query/fragment are fine + ( + "/v1/{a}?query={b}", + dict(a="../../other/endpoint", b="a&bad=true"), + "/v1/..%2F..%2Fother%2Fendpoint?query=a%26bad%3Dtrue", + ), + ("/v1/{val}", dict(val="a/b/c"), "/v1/a%2Fb%2Fc"), + ("/v1/{val}", dict(val="a/b/c?query=value"), "/v1/a%2Fb%2Fc%3Fquery=value"), + ("/v1/{val}", dict(val="a/b/c?query=value&bad=true"), "/v1/a%2Fb%2Fc%3Fquery=value&bad=true"), + ("/v1/{val}", dict(val="%20"), "/v1/%2520"), # escapes escape sequences in input + # Query: slash and ? are safe, # is not + ("/items?q={v}", dict(v="a/b"), "/items?q=a/b"), + ("/items?q={v}", dict(v="a?b"), "/items?q=a?b"), + ("/items?q={v}", dict(v="a#b"), "/items?q=a%23b"), + ("/items?q={v}", dict(v="a b"), "/items?q=a%20b"), + # Fragment: slash and ? are safe + ("/docs#{v}", dict(v="a/b"), "/docs#a/b"), + ("/docs#{v}", dict(v="a?b"), "/docs#a?b"), + # Path: slash, ? and # are all encoded + ("/v1/{v}", dict(v="a/b"), "/v1/a%2Fb"), + ("/v1/{v}", dict(v="a?b"), "/v1/a%3Fb"), + ("/v1/{v}", dict(v="a#b"), "/v1/a%23b"), + # same var encoded differently by component + ( + "/v1/{v}?q={v}#{v}", + dict(v="a/b?c#d"), + "/v1/a%2Fb%3Fc%23d?q=a/b?c%23d#a/b?c%23d", + ), + ("/v1/{val}", dict(val="x?admin=true"), "/v1/x%3Fadmin=true"), # query injection + ("/v1/{val}", dict(val="x#admin"), "/v1/x%23admin"), # fragment injection + ], +) +def test_interpolation(template: str, kwargs: dict[str, Any], expected: str) -> None: + assert path_template(template, **kwargs) == expected + + +def test_missing_kwarg_raises_key_error() -> None: + with pytest.raises(KeyError, match="org_id"): + path_template("/v1/{org_id}") + + +@pytest.mark.parametrize( + "template, kwargs", + [ + ("{a}/path", dict(a=".")), + ("{a}/path", dict(a="..")), + ("/v1/{a}", dict(a=".")), + ("/v1/{a}", dict(a="..")), + ("/v1/{a}/path", dict(a=".")), + ("/v1/{a}/path", dict(a="..")), + ("/v1/{a}{b}", dict(a=".", b=".")), # adjacent vars → ".." + ("/v1/{a}.", dict(a=".")), # var + static → ".." + ("/v1/{a}{b}", dict(a="", b=".")), # empty + dot → "." + ("/v1/%2e/{x}", dict(x="ok")), # encoded dot in static text + ("/v1/%2e./{x}", dict(x="ok")), # mixed encoded ".." in static + ("/v1/.%2E/{x}", dict(x="ok")), # mixed encoded ".." in static + ("/v1/{v}?q=1", dict(v="..")), + ("/v1/{v}#frag", dict(v="..")), + ], +) +def test_dot_segment_rejected(template: str, kwargs: dict[str, Any]) -> None: + with pytest.raises(ValueError, match="dot-segment"): + path_template(template, **kwargs) From ca62c45656a92d1188e275359ab77f0ec26410d9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 21 Mar 2026 11:34:37 +0000 Subject: [PATCH 19/19] release: 5.3.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 33 +++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- src/imagekitio/_version.py | 2 +- 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b29b3b6..4101074 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "5.2.0" + ".": "5.3.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e5f11a..6d783ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,38 @@ # Changelog +## 5.3.0 (2026-03-21) + +Full Changelog: [v5.2.0...v5.3.0](https://github.com/imagekit-developer/imagekit-python/compare/v5.2.0...v5.3.0) + +### Features + +* **api:** dpr type update ([39d38db](https://github.com/imagekit-developer/imagekit-python/commit/39d38dbd0ca1e81dc84771e6a98a629f90e8dba9)) +* **api:** revert dpr breaking change ([7301276](https://github.com/imagekit-developer/imagekit-python/commit/73012764930ba8b461f98bbfd0349b395e46a7a4)) + + +### Bug Fixes + +* **deps:** bump minimum typing-extensions version ([393174d](https://github.com/imagekit-developer/imagekit-python/commit/393174d253a106393b888aed50f9ca7623c9c06e)) +* **pydantic:** do not pass `by_alias` unless set ([fda01e4](https://github.com/imagekit-developer/imagekit-python/commit/fda01e45e315c192d24a6183cd24fd43cbcb0722)) +* sanitize endpoint path params ([fa1972c](https://github.com/imagekit-developer/imagekit-python/commit/fa1972cd605c2a7a81ad069161cc687d0ec4193d)) + + +### Chores + +* **ci:** skip uploading artifacts on stainless-internal branches ([15805f5](https://github.com/imagekit-developer/imagekit-python/commit/15805f5e6b642f0cebfbc8131f99f886e8e72e99)) +* **dependencies:** require standardwebhooks 1.0.1 ([f7c4465](https://github.com/imagekit-developer/imagekit-python/commit/f7c44652ef95cfa1aefef380d280036158519007)) +* format all `api.md` files ([09cbb17](https://github.com/imagekit-developer/imagekit-python/commit/09cbb17e722d374477b13fd4045201ab75ddcc7e)) +* **internal:** add request options to SSE classes ([c0dee43](https://github.com/imagekit-developer/imagekit-python/commit/c0dee43afe3bc1f6ea35649532594e59fb4b8953)) +* **internal:** bump dependencies ([6702b4b](https://github.com/imagekit-developer/imagekit-python/commit/6702b4bcd12af1d670a4b73a7d9bedd68ccc5560)) +* **internal:** fix lint error on Python 3.14 ([89d503b](https://github.com/imagekit-developer/imagekit-python/commit/89d503b2a885f57edbbd6ffded3d1cddac61a53e)) +* **internal:** make `test_proxy_environment_variables` more resilient ([821dd3f](https://github.com/imagekit-developer/imagekit-python/commit/821dd3f61db9b2be3297dc1b8a9e63d257df9ed1)) +* **internal:** make `test_proxy_environment_variables` more resilient to env ([487887e](https://github.com/imagekit-developer/imagekit-python/commit/487887eb0e4c405c0f8294e6a82ef6c7a2187c5c)) +* **internal:** remove mock server code ([978ed61](https://github.com/imagekit-developer/imagekit-python/commit/978ed611a909e2d616b322e23bfe3d14e8f256f4)) +* **internal:** tweak CI branches ([369ff73](https://github.com/imagekit-developer/imagekit-python/commit/369ff736880f83ac7196411241801fe9b04a7dfb)) +* **tests:** update webhook tests ([d94ada8](https://github.com/imagekit-developer/imagekit-python/commit/d94ada85d3c70d8f896fe276d73afd6c3fb17326)) +* update mock server docs ([54f47c6](https://github.com/imagekit-developer/imagekit-python/commit/54f47c663b48f2b6a88bf05ba26a0f2a139ee752)) +* update placeholder string ([d06cdca](https://github.com/imagekit-developer/imagekit-python/commit/d06cdca52df17c23df1d9cd8a468b8184bde219a)) + ## 5.2.0 (2026-02-02) Full Changelog: [v5.1.2...v5.2.0](https://github.com/imagekit-developer/imagekit-python/compare/v5.1.2...v5.2.0) diff --git a/pyproject.toml b/pyproject.toml index be26513..f04a830 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "imagekitio" -version = "5.2.0" +version = "5.3.0" description = "The official Python library for the ImageKit API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/imagekitio/_version.py b/src/imagekitio/_version.py index 33de272..7e78486 100644 --- a/src/imagekitio/_version.py +++ b/src/imagekitio/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "imagekitio" -__version__ = "5.2.0" # x-release-please-version +__version__ = "5.3.0" # x-release-please-version