diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 108abc9..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,104 +0,0 @@ -# Changelog - -## 1.2.0 (2026-01-30) - -Full Changelog: [v1.1.0...v1.2.0](https://github.com/brapi-dev/brapi-python/compare/v1.1.0...v1.2.0) - -### Features - -* **client:** add custom JSON encoder for extended type support ([05834cc](https://github.com/brapi-dev/brapi-python/commit/05834ccc9e905ba5a730eacf03080b93d6acede9)) - - -### Chores - -* **ci:** upgrade `actions/github-script` ([c133c8f](https://github.com/brapi-dev/brapi-python/commit/c133c8fa5a7baffae64a019c1fe7825033320509)) -* **internal:** update `actions/checkout` version ([3cafae4](https://github.com/brapi-dev/brapi-python/commit/3cafae4bb3e4f151d053cb677159303489836eb9)) - -## 1.1.0 (2026-01-14) - -Full Changelog: [v1.0.5...v1.1.0](https://github.com/brapi-dev/brapi-python/compare/v1.0.5...v1.1.0) - -### Features - -* **client:** add support for binary request streaming ([f7eb87e](https://github.com/brapi-dev/brapi-python/commit/f7eb87e9fc953d88d4089f62da193dac2348f940)) - - -### Chores - -* **internal:** codegen related update ([320cbf8](https://github.com/brapi-dev/brapi-python/commit/320cbf88b64040419879dd30e0afd4e349ddbd16)) - -## 1.0.5 (2025-12-19) - -Full Changelog: [v1.0.4...v1.0.5](https://github.com/brapi-dev/brapi-python/compare/v1.0.4...v1.0.5) - -### Bug Fixes - -* use async_to_httpx_files in patch method ([a061229](https://github.com/brapi-dev/brapi-python/commit/a0612291f12c3dbc71faab50d3beb93848801db3)) - - -### Chores - -* **internal:** add `--fix` argument to lint script ([76c6f31](https://github.com/brapi-dev/brapi-python/commit/76c6f31884a3fc3588c955002aba49679fd42e9b)) -* **internal:** add missing files argument to base client ([cababd6](https://github.com/brapi-dev/brapi-python/commit/cababd656bcc34c68419a4d00812965f92e0fa5c)) -* speedup initial import ([7261e02](https://github.com/brapi-dev/brapi-python/commit/7261e025f7cf5448c964892296d7c54999926cdd)) - -## 1.0.4 (2025-12-09) - -Full Changelog: [v1.0.3...v1.0.4](https://github.com/brapi-dev/brapi-python/compare/v1.0.3...v1.0.4) - -### Bug Fixes - -* ensure streams are always closed ([d1f3a3e](https://github.com/brapi-dev/brapi-python/commit/d1f3a3e1d98fb1ed84e31a58a1df5332446cd793)) -* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([d1f1fcc](https://github.com/brapi-dev/brapi-python/commit/d1f1fcc15a0457f8c03ed22ed76730bee6b56fc1)) - - -### Chores - -* **deps:** mypy 1.18.1 has a regression, pin to 1.17 ([c03a35a](https://github.com/brapi-dev/brapi-python/commit/c03a35aa19cb32632f2929ebe8e44c171445e5fd)) -* **docs:** use environment variables for authentication in code snippets ([f80ab62](https://github.com/brapi-dev/brapi-python/commit/f80ab628737e2f32db10fc63b47ad0339733c57f)) -* update lockfile ([972cee4](https://github.com/brapi-dev/brapi-python/commit/972cee46353bc8dd7a096f975ae233e508bcf6ec)) - -## 1.0.3 (2025-11-22) - -Full Changelog: [v1.0.2...v1.0.3](https://github.com/brapi-dev/brapi-python/compare/v1.0.2...v1.0.3) - -### Chores - -* add Python 3.14 classifier and testing ([bb6876e](https://github.com/brapi-dev/brapi-python/commit/bb6876e969d28e9458d89cc54c134c43261397e6)) - -## 1.0.2 (2025-11-12) - -Full Changelog: [v1.0.1...v1.0.2](https://github.com/brapi-dev/brapi-python/compare/v1.0.1...v1.0.2) - -### Bug Fixes - -* **client:** close streams without requiring full consumption ([a23e5a4](https://github.com/brapi-dev/brapi-python/commit/a23e5a4c2d30869c11ab6e09f3eea4ee847c68c4)) -* compat with Python 3.14 ([7d86ba1](https://github.com/brapi-dev/brapi-python/commit/7d86ba177c65bde5e0e84c2b7dea7e0f1667cce5)) -* **compat:** update signatures of `model_dump` and `model_dump_json` for Pydantic v1 ([220d879](https://github.com/brapi-dev/brapi-python/commit/220d879c5e6ed1762b5815b007e5dcc942a2e0e4)) - - -### Chores - -* **internal/tests:** avoid race condition with implicit client cleanup ([d11f1ff](https://github.com/brapi-dev/brapi-python/commit/d11f1ffe7fe451a81c01c4cc90054f6e4190e2de)) -* **internal:** grammar fix (it's -> its) ([1d324d4](https://github.com/brapi-dev/brapi-python/commit/1d324d4f8e18fde597d35938226fd2ca7efda9d1)) -* **package:** drop Python 3.8 support ([0d274f6](https://github.com/brapi-dev/brapi-python/commit/0d274f6b323c4005e8e5ad10fac72c3aca27e3b8)) - -## 1.0.1 (2025-10-18) - -Full Changelog: [v1.0.0...v1.0.1](https://github.com/brapi-dev/brapi-python/compare/v1.0.0...v1.0.1) - -### Chores - -* bump `httpx-aiohttp` version to 0.1.9 ([58fd5fc](https://github.com/brapi-dev/brapi-python/commit/58fd5fc95c4b0b4e3f92fc5bca2d6dcea5bbe8c9)) - -## 1.0.0 (2025-10-12) - -Full Changelog: [v0.0.1...v1.0.0](https://github.com/brapi-dev/brapi-python/compare/v0.0.1...v1.0.0) - -### Chores - -* sync repo ([a54d73b](https://github.com/brapi-dev/brapi-python/commit/a54d73b6e3d9e6f0347ff61d73885cf6cadb4c56)) -* update SDK settings ([5313c1b](https://github.com/brapi-dev/brapi-python/commit/5313c1bccd7d4366b768ec14fa6a22cb0ebbefd0)) -* update SDK settings ([604a534](https://github.com/brapi-dev/brapi-python/commit/604a534b7fc3daf6e9128a98e74aca9295a02c70)) -* update SDK settings ([551afe3](https://github.com/brapi-dev/brapi-python/commit/551afe39d139c11f6e6ace580ed8faa06217a073)) -* update SDK settings ([14efeb5](https://github.com/brapi-dev/brapi-python/commit/14efeb558642ad68760ce354f10d6f37a1df7f68)) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5068a3b..9d51ff5 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/pyproject.toml b/pyproject.toml index ecae5b3..b7861d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,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 = [ diff --git a/requirements-dev.lock b/requirements-dev.lock index 659c238..3581988 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 brapi # via httpx-aiohttp aiosignal==1.4.0 # via aiohttp annotated-types==0.7.0 # via pydantic -anyio==4.12.0 +anyio==4.12.1 # via brapi # via httpx argcomplete==3.6.3 @@ -31,7 +31,7 @@ attrs==25.4.0 # via nox 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 @@ -61,7 +61,7 @@ httpx==0.28.1 # via brapi # via httpx-aiohttp # via respx -httpx-aiohttp==0.1.9 +httpx-aiohttp==0.1.12 # via brapi humanize==4.13.0 # via nox @@ -69,7 +69,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 @@ -82,14 +82,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 @@ -115,13 +115,13 @@ 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 # via brapi time-machine==2.19.0 -tomli==2.3.0 +tomli==2.4.0 # via dependency-groups # via mypy # via nox @@ -141,7 +141,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 yarl==1.22.0 # via aiohttp diff --git a/requirements.lock b/requirements.lock index f030e74..b885522 100644 --- a/requirements.lock +++ b/requirements.lock @@ -12,21 +12,21 @@ -e file:. aiohappyeyeballs==2.6.1 # via aiohttp -aiohttp==3.13.2 +aiohttp==3.13.3 # via brapi # via httpx-aiohttp aiosignal==1.4.0 # via aiohttp annotated-types==0.7.0 # via pydantic -anyio==4.12.0 +anyio==4.12.1 # via brapi # via httpx async-timeout==5.0.1 # via aiohttp attrs==25.4.0 # via aiohttp -certifi==2025.11.12 +certifi==2026.1.4 # via httpcore # via httpx distro==1.9.0 @@ -43,7 +43,7 @@ httpcore==1.0.9 httpx==0.28.1 # via brapi # via httpx-aiohttp -httpx-aiohttp==0.1.9 +httpx-aiohttp==0.1.12 # via brapi idna==3.11 # via anyio 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 diff --git a/src/brapi/_response.py b/src/brapi/_response.py index 0f7b71f..b2aad2b 100644 --- a/src/brapi/_response.py +++ b/src/brapi/_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/brapi/_streaming.py b/src/brapi/_streaming.py index e5f7242..258e79d 100644 --- a/src/brapi/_streaming.py +++ b/src/brapi/_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 Brapi, AsyncBrapi + 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: Brapi, + 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: AsyncBrapi, + 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__() diff --git a/src/brapi/_utils/_compat.py b/src/brapi/_utils/_compat.py index dd70323..2c70b29 100644 --- a/src/brapi/_utils/_compat.py +++ b/src/brapi/_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: diff --git a/tests/api_resources/test_available.py b/tests/api_resources/test_available.py index 6b366e0..59ececf 100644 --- a/tests/api_resources/test_available.py +++ b/tests/api_resources/test_available.py @@ -17,13 +17,13 @@ class TestAvailable: 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: Brapi) -> None: available = client.available.list() assert_matches_type(AvailableListResponse, available, 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: Brapi) -> None: available = client.available.list( @@ -32,7 +32,7 @@ def test_method_list_with_all_params(self, client: Brapi) -> None: ) assert_matches_type(AvailableListResponse, available, 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: Brapi) -> None: response = client.available.with_raw_response.list() @@ -42,7 +42,7 @@ def test_raw_response_list(self, client: Brapi) -> None: available = response.parse() assert_matches_type(AvailableListResponse, available, 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: Brapi) -> None: with client.available.with_streaming_response.list() as response: @@ -60,13 +60,13 @@ class TestAsyncAvailable: "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: AsyncBrapi) -> None: available = await async_client.available.list() assert_matches_type(AvailableListResponse, available, 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: AsyncBrapi) -> None: available = await async_client.available.list( @@ -75,7 +75,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncBrapi) -> No ) assert_matches_type(AvailableListResponse, available, 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: AsyncBrapi) -> None: response = await async_client.available.with_raw_response.list() @@ -85,7 +85,7 @@ async def test_raw_response_list(self, async_client: AsyncBrapi) -> None: available = await response.parse() assert_matches_type(AvailableListResponse, available, 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: AsyncBrapi) -> None: async with async_client.available.with_streaming_response.list() as response: diff --git a/tests/api_resources/test_quote.py b/tests/api_resources/test_quote.py index 21a14a6..a80bd69 100644 --- a/tests/api_resources/test_quote.py +++ b/tests/api_resources/test_quote.py @@ -17,7 +17,7 @@ class TestQuote: 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_retrieve(self, client: Brapi) -> None: quote = client.quote.retrieve( @@ -25,7 +25,7 @@ def test_method_retrieve(self, client: Brapi) -> None: ) assert_matches_type(QuoteRetrieveResponse, quote, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: Brapi) -> None: quote = client.quote.retrieve( @@ -39,7 +39,7 @@ def test_method_retrieve_with_all_params(self, client: Brapi) -> None: ) assert_matches_type(QuoteRetrieveResponse, quote, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Brapi) -> None: response = client.quote.with_raw_response.retrieve( @@ -51,7 +51,7 @@ def test_raw_response_retrieve(self, client: Brapi) -> None: quote = response.parse() assert_matches_type(QuoteRetrieveResponse, quote, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Brapi) -> None: with client.quote.with_streaming_response.retrieve( @@ -65,7 +65,7 @@ def test_streaming_response_retrieve(self, client: Brapi) -> 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_retrieve(self, client: Brapi) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `tickers` but received ''"): @@ -73,13 +73,13 @@ def test_path_params_retrieve(self, client: Brapi) -> None: tickers="", ) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_list(self, client: Brapi) -> None: quote = client.quote.list() assert_matches_type(QuoteListResponse, quote, 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: Brapi) -> None: quote = client.quote.list( @@ -94,7 +94,7 @@ def test_method_list_with_all_params(self, client: Brapi) -> None: ) assert_matches_type(QuoteListResponse, quote, 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: Brapi) -> None: response = client.quote.with_raw_response.list() @@ -104,7 +104,7 @@ def test_raw_response_list(self, client: Brapi) -> None: quote = response.parse() assert_matches_type(QuoteListResponse, quote, 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: Brapi) -> None: with client.quote.with_streaming_response.list() as response: @@ -122,7 +122,7 @@ class TestAsyncQuote: "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_retrieve(self, async_client: AsyncBrapi) -> None: quote = await async_client.quote.retrieve( @@ -130,7 +130,7 @@ async def test_method_retrieve(self, async_client: AsyncBrapi) -> None: ) assert_matches_type(QuoteRetrieveResponse, quote, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncBrapi) -> None: quote = await async_client.quote.retrieve( @@ -144,7 +144,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncBrapi) - ) assert_matches_type(QuoteRetrieveResponse, quote, 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_retrieve(self, async_client: AsyncBrapi) -> None: response = await async_client.quote.with_raw_response.retrieve( @@ -156,7 +156,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncBrapi) -> None: quote = await response.parse() assert_matches_type(QuoteRetrieveResponse, quote, 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_retrieve(self, async_client: AsyncBrapi) -> None: async with async_client.quote.with_streaming_response.retrieve( @@ -170,7 +170,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncBrapi) -> No 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_retrieve(self, async_client: AsyncBrapi) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `tickers` but received ''"): @@ -178,13 +178,13 @@ async def test_path_params_retrieve(self, async_client: AsyncBrapi) -> None: tickers="", ) - @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: AsyncBrapi) -> None: quote = await async_client.quote.list() assert_matches_type(QuoteListResponse, quote, 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: AsyncBrapi) -> None: quote = await async_client.quote.list( @@ -199,7 +199,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncBrapi) -> No ) assert_matches_type(QuoteListResponse, quote, 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: AsyncBrapi) -> None: response = await async_client.quote.with_raw_response.list() @@ -209,7 +209,7 @@ async def test_raw_response_list(self, async_client: AsyncBrapi) -> None: quote = await response.parse() assert_matches_type(QuoteListResponse, quote, 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: AsyncBrapi) -> None: async with async_client.quote.with_streaming_response.list() as response: diff --git a/tests/api_resources/v2/test_crypto.py b/tests/api_resources/v2/test_crypto.py index 957328e..5379377 100644 --- a/tests/api_resources/v2/test_crypto.py +++ b/tests/api_resources/v2/test_crypto.py @@ -20,7 +20,7 @@ class TestCrypto: 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_retrieve(self, client: Brapi) -> None: crypto = client.v2.crypto.retrieve( @@ -28,7 +28,7 @@ def test_method_retrieve(self, client: Brapi) -> None: ) assert_matches_type(CryptoRetrieveResponse, crypto, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: Brapi) -> None: crypto = client.v2.crypto.retrieve( @@ -40,7 +40,7 @@ def test_method_retrieve_with_all_params(self, client: Brapi) -> None: ) assert_matches_type(CryptoRetrieveResponse, crypto, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Brapi) -> None: response = client.v2.crypto.with_raw_response.retrieve( @@ -52,7 +52,7 @@ def test_raw_response_retrieve(self, client: Brapi) -> None: crypto = response.parse() assert_matches_type(CryptoRetrieveResponse, crypto, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Brapi) -> None: with client.v2.crypto.with_streaming_response.retrieve( @@ -66,13 +66,13 @@ def test_streaming_response_retrieve(self, client: Brapi) -> 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_list_available(self, client: Brapi) -> None: crypto = client.v2.crypto.list_available() assert_matches_type(CryptoListAvailableResponse, crypto, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_list_available_with_all_params(self, client: Brapi) -> None: crypto = client.v2.crypto.list_available( @@ -81,7 +81,7 @@ def test_method_list_available_with_all_params(self, client: Brapi) -> None: ) assert_matches_type(CryptoListAvailableResponse, crypto, 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_available(self, client: Brapi) -> None: response = client.v2.crypto.with_raw_response.list_available() @@ -91,7 +91,7 @@ def test_raw_response_list_available(self, client: Brapi) -> None: crypto = response.parse() assert_matches_type(CryptoListAvailableResponse, crypto, 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_available(self, client: Brapi) -> None: with client.v2.crypto.with_streaming_response.list_available() as response: @@ -109,7 +109,7 @@ class TestAsyncCrypto: "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_retrieve(self, async_client: AsyncBrapi) -> None: crypto = await async_client.v2.crypto.retrieve( @@ -117,7 +117,7 @@ async def test_method_retrieve(self, async_client: AsyncBrapi) -> None: ) assert_matches_type(CryptoRetrieveResponse, crypto, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncBrapi) -> None: crypto = await async_client.v2.crypto.retrieve( @@ -129,7 +129,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncBrapi) - ) assert_matches_type(CryptoRetrieveResponse, crypto, 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_retrieve(self, async_client: AsyncBrapi) -> None: response = await async_client.v2.crypto.with_raw_response.retrieve( @@ -141,7 +141,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncBrapi) -> None: crypto = await response.parse() assert_matches_type(CryptoRetrieveResponse, crypto, 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_retrieve(self, async_client: AsyncBrapi) -> None: async with async_client.v2.crypto.with_streaming_response.retrieve( @@ -155,13 +155,13 @@ async def test_streaming_response_retrieve(self, async_client: AsyncBrapi) -> No 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_list_available(self, async_client: AsyncBrapi) -> None: crypto = await async_client.v2.crypto.list_available() assert_matches_type(CryptoListAvailableResponse, crypto, 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_available_with_all_params(self, async_client: AsyncBrapi) -> None: crypto = await async_client.v2.crypto.list_available( @@ -170,7 +170,7 @@ async def test_method_list_available_with_all_params(self, async_client: AsyncBr ) assert_matches_type(CryptoListAvailableResponse, crypto, 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_available(self, async_client: AsyncBrapi) -> None: response = await async_client.v2.crypto.with_raw_response.list_available() @@ -180,7 +180,7 @@ async def test_raw_response_list_available(self, async_client: AsyncBrapi) -> No crypto = await response.parse() assert_matches_type(CryptoListAvailableResponse, crypto, 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_available(self, async_client: AsyncBrapi) -> None: async with async_client.v2.crypto.with_streaming_response.list_available() as response: diff --git a/tests/api_resources/v2/test_currency.py b/tests/api_resources/v2/test_currency.py index 0326fc1..3af6cfd 100644 --- a/tests/api_resources/v2/test_currency.py +++ b/tests/api_resources/v2/test_currency.py @@ -20,7 +20,7 @@ class TestCurrency: 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_retrieve(self, client: Brapi) -> None: currency = client.v2.currency.retrieve( @@ -28,7 +28,7 @@ def test_method_retrieve(self, client: Brapi) -> None: ) assert_matches_type(CurrencyRetrieveResponse, currency, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: Brapi) -> None: currency = client.v2.currency.retrieve( @@ -37,7 +37,7 @@ def test_method_retrieve_with_all_params(self, client: Brapi) -> None: ) assert_matches_type(CurrencyRetrieveResponse, currency, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Brapi) -> None: response = client.v2.currency.with_raw_response.retrieve( @@ -49,7 +49,7 @@ def test_raw_response_retrieve(self, client: Brapi) -> None: currency = response.parse() assert_matches_type(CurrencyRetrieveResponse, currency, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Brapi) -> None: with client.v2.currency.with_streaming_response.retrieve( @@ -63,13 +63,13 @@ def test_streaming_response_retrieve(self, client: Brapi) -> 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_list_available(self, client: Brapi) -> None: currency = client.v2.currency.list_available() assert_matches_type(CurrencyListAvailableResponse, currency, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_list_available_with_all_params(self, client: Brapi) -> None: currency = client.v2.currency.list_available( @@ -78,7 +78,7 @@ def test_method_list_available_with_all_params(self, client: Brapi) -> None: ) assert_matches_type(CurrencyListAvailableResponse, currency, 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_available(self, client: Brapi) -> None: response = client.v2.currency.with_raw_response.list_available() @@ -88,7 +88,7 @@ def test_raw_response_list_available(self, client: Brapi) -> None: currency = response.parse() assert_matches_type(CurrencyListAvailableResponse, currency, 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_available(self, client: Brapi) -> None: with client.v2.currency.with_streaming_response.list_available() as response: @@ -106,7 +106,7 @@ class TestAsyncCurrency: "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_retrieve(self, async_client: AsyncBrapi) -> None: currency = await async_client.v2.currency.retrieve( @@ -114,7 +114,7 @@ async def test_method_retrieve(self, async_client: AsyncBrapi) -> None: ) assert_matches_type(CurrencyRetrieveResponse, currency, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncBrapi) -> None: currency = await async_client.v2.currency.retrieve( @@ -123,7 +123,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncBrapi) - ) assert_matches_type(CurrencyRetrieveResponse, currency, 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_retrieve(self, async_client: AsyncBrapi) -> None: response = await async_client.v2.currency.with_raw_response.retrieve( @@ -135,7 +135,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncBrapi) -> None: currency = await response.parse() assert_matches_type(CurrencyRetrieveResponse, currency, 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_retrieve(self, async_client: AsyncBrapi) -> None: async with async_client.v2.currency.with_streaming_response.retrieve( @@ -149,13 +149,13 @@ async def test_streaming_response_retrieve(self, async_client: AsyncBrapi) -> No 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_list_available(self, async_client: AsyncBrapi) -> None: currency = await async_client.v2.currency.list_available() assert_matches_type(CurrencyListAvailableResponse, currency, 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_available_with_all_params(self, async_client: AsyncBrapi) -> None: currency = await async_client.v2.currency.list_available( @@ -164,7 +164,7 @@ async def test_method_list_available_with_all_params(self, async_client: AsyncBr ) assert_matches_type(CurrencyListAvailableResponse, currency, 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_available(self, async_client: AsyncBrapi) -> None: response = await async_client.v2.currency.with_raw_response.list_available() @@ -174,7 +174,7 @@ async def test_raw_response_list_available(self, async_client: AsyncBrapi) -> No currency = await response.parse() assert_matches_type(CurrencyListAvailableResponse, currency, 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_available(self, async_client: AsyncBrapi) -> None: async with async_client.v2.currency.with_streaming_response.list_available() as response: diff --git a/tests/api_resources/v2/test_inflation.py b/tests/api_resources/v2/test_inflation.py index 4071b4d..ac67b5e 100644 --- a/tests/api_resources/v2/test_inflation.py +++ b/tests/api_resources/v2/test_inflation.py @@ -21,13 +21,13 @@ class TestInflation: 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_retrieve(self, client: Brapi) -> None: inflation = client.v2.inflation.retrieve() assert_matches_type(InflationRetrieveResponse, inflation, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: Brapi) -> None: inflation = client.v2.inflation.retrieve( @@ -41,7 +41,7 @@ def test_method_retrieve_with_all_params(self, client: Brapi) -> None: ) assert_matches_type(InflationRetrieveResponse, inflation, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Brapi) -> None: response = client.v2.inflation.with_raw_response.retrieve() @@ -51,7 +51,7 @@ def test_raw_response_retrieve(self, client: Brapi) -> None: inflation = response.parse() assert_matches_type(InflationRetrieveResponse, inflation, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Brapi) -> None: with client.v2.inflation.with_streaming_response.retrieve() as response: @@ -63,13 +63,13 @@ def test_streaming_response_retrieve(self, client: Brapi) -> 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_list_available(self, client: Brapi) -> None: inflation = client.v2.inflation.list_available() assert_matches_type(InflationListAvailableResponse, inflation, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_list_available_with_all_params(self, client: Brapi) -> None: inflation = client.v2.inflation.list_available( @@ -78,7 +78,7 @@ def test_method_list_available_with_all_params(self, client: Brapi) -> None: ) assert_matches_type(InflationListAvailableResponse, inflation, 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_available(self, client: Brapi) -> None: response = client.v2.inflation.with_raw_response.list_available() @@ -88,7 +88,7 @@ def test_raw_response_list_available(self, client: Brapi) -> None: inflation = response.parse() assert_matches_type(InflationListAvailableResponse, inflation, 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_available(self, client: Brapi) -> None: with client.v2.inflation.with_streaming_response.list_available() as response: @@ -106,13 +106,13 @@ class TestAsyncInflation: "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_retrieve(self, async_client: AsyncBrapi) -> None: inflation = await async_client.v2.inflation.retrieve() assert_matches_type(InflationRetrieveResponse, inflation, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncBrapi) -> None: inflation = await async_client.v2.inflation.retrieve( @@ -126,7 +126,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncBrapi) - ) assert_matches_type(InflationRetrieveResponse, inflation, 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_retrieve(self, async_client: AsyncBrapi) -> None: response = await async_client.v2.inflation.with_raw_response.retrieve() @@ -136,7 +136,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncBrapi) -> None: inflation = await response.parse() assert_matches_type(InflationRetrieveResponse, inflation, 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_retrieve(self, async_client: AsyncBrapi) -> None: async with async_client.v2.inflation.with_streaming_response.retrieve() as response: @@ -148,13 +148,13 @@ async def test_streaming_response_retrieve(self, async_client: AsyncBrapi) -> No 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_list_available(self, async_client: AsyncBrapi) -> None: inflation = await async_client.v2.inflation.list_available() assert_matches_type(InflationListAvailableResponse, inflation, 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_available_with_all_params(self, async_client: AsyncBrapi) -> None: inflation = await async_client.v2.inflation.list_available( @@ -163,7 +163,7 @@ async def test_method_list_available_with_all_params(self, async_client: AsyncBr ) assert_matches_type(InflationListAvailableResponse, inflation, 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_available(self, async_client: AsyncBrapi) -> None: response = await async_client.v2.inflation.with_raw_response.list_available() @@ -173,7 +173,7 @@ async def test_raw_response_list_available(self, async_client: AsyncBrapi) -> No inflation = await response.parse() assert_matches_type(InflationListAvailableResponse, inflation, 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_available(self, async_client: AsyncBrapi) -> None: async with async_client.v2.inflation.with_streaming_response.list_available() as response: diff --git a/tests/api_resources/v2/test_prime_rate.py b/tests/api_resources/v2/test_prime_rate.py index ecb5738..ec59675 100644 --- a/tests/api_resources/v2/test_prime_rate.py +++ b/tests/api_resources/v2/test_prime_rate.py @@ -21,13 +21,13 @@ class TestPrimeRate: 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_retrieve(self, client: Brapi) -> None: prime_rate = client.v2.prime_rate.retrieve() assert_matches_type(PrimeRateRetrieveResponse, prime_rate, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: Brapi) -> None: prime_rate = client.v2.prime_rate.retrieve( @@ -41,7 +41,7 @@ def test_method_retrieve_with_all_params(self, client: Brapi) -> None: ) assert_matches_type(PrimeRateRetrieveResponse, prime_rate, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Brapi) -> None: response = client.v2.prime_rate.with_raw_response.retrieve() @@ -51,7 +51,7 @@ def test_raw_response_retrieve(self, client: Brapi) -> None: prime_rate = response.parse() assert_matches_type(PrimeRateRetrieveResponse, prime_rate, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Brapi) -> None: with client.v2.prime_rate.with_streaming_response.retrieve() as response: @@ -63,13 +63,13 @@ def test_streaming_response_retrieve(self, client: Brapi) -> 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_list_available(self, client: Brapi) -> None: prime_rate = client.v2.prime_rate.list_available() assert_matches_type(PrimeRateListAvailableResponse, prime_rate, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_list_available_with_all_params(self, client: Brapi) -> None: prime_rate = client.v2.prime_rate.list_available( @@ -78,7 +78,7 @@ def test_method_list_available_with_all_params(self, client: Brapi) -> None: ) assert_matches_type(PrimeRateListAvailableResponse, prime_rate, 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_available(self, client: Brapi) -> None: response = client.v2.prime_rate.with_raw_response.list_available() @@ -88,7 +88,7 @@ def test_raw_response_list_available(self, client: Brapi) -> None: prime_rate = response.parse() assert_matches_type(PrimeRateListAvailableResponse, prime_rate, 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_available(self, client: Brapi) -> None: with client.v2.prime_rate.with_streaming_response.list_available() as response: @@ -106,13 +106,13 @@ class TestAsyncPrimeRate: "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_retrieve(self, async_client: AsyncBrapi) -> None: prime_rate = await async_client.v2.prime_rate.retrieve() assert_matches_type(PrimeRateRetrieveResponse, prime_rate, path=["response"]) - @pytest.mark.skip(reason="Prism tests are disabled") + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncBrapi) -> None: prime_rate = await async_client.v2.prime_rate.retrieve( @@ -126,7 +126,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncBrapi) - ) assert_matches_type(PrimeRateRetrieveResponse, prime_rate, 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_retrieve(self, async_client: AsyncBrapi) -> None: response = await async_client.v2.prime_rate.with_raw_response.retrieve() @@ -136,7 +136,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncBrapi) -> None: prime_rate = await response.parse() assert_matches_type(PrimeRateRetrieveResponse, prime_rate, 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_retrieve(self, async_client: AsyncBrapi) -> None: async with async_client.v2.prime_rate.with_streaming_response.retrieve() as response: @@ -148,13 +148,13 @@ async def test_streaming_response_retrieve(self, async_client: AsyncBrapi) -> No 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_list_available(self, async_client: AsyncBrapi) -> None: prime_rate = await async_client.v2.prime_rate.list_available() assert_matches_type(PrimeRateListAvailableResponse, prime_rate, 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_available_with_all_params(self, async_client: AsyncBrapi) -> None: prime_rate = await async_client.v2.prime_rate.list_available( @@ -163,7 +163,7 @@ async def test_method_list_available_with_all_params(self, async_client: AsyncBr ) assert_matches_type(PrimeRateListAvailableResponse, prime_rate, 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_available(self, async_client: AsyncBrapi) -> None: response = await async_client.v2.prime_rate.with_raw_response.list_available() @@ -173,7 +173,7 @@ async def test_raw_response_list_available(self, async_client: AsyncBrapi) -> No prime_rate = await response.parse() assert_matches_type(PrimeRateListAvailableResponse, prime_rate, 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_available(self, async_client: AsyncBrapi) -> None: async with async_client.v2.prime_rate.with_streaming_response.list_available() as response: diff --git a/tests/test_client.py b/tests/test_client.py index ad052f5..62158e8 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -957,6 +957,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 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() @@ -1873,6 +1881,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 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()