diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d0ab664..d43a621 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.2.0" + ".": "1.2.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 108abc9..ebafd7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 1.2.1 (2026-02-25) + +Full Changelog: [v1.2.0...v1.2.1](https://github.com/brapi-dev/brapi-python/compare/v1.2.0...v1.2.1) + +### Chores + +* format all `api.md` files ([691c9c6](https://github.com/brapi-dev/brapi-python/commit/691c9c699beb5779f2593de827024d861963eb73)) +* **internal:** add request options to SSE classes ([c83d52b](https://github.com/brapi-dev/brapi-python/commit/c83d52b1acbd6d9f062aa08aea4633d2ff465ab3)) +* **internal:** bump dependencies ([2afb698](https://github.com/brapi-dev/brapi-python/commit/2afb69816a7f44ee93344c61f94eb86f4c340e9f)) +* **internal:** fix lint error on Python 3.14 ([8f891ca](https://github.com/brapi-dev/brapi-python/commit/8f891ca4cd532ff0b5bc2ea4748868189d1ac5bf)) +* **internal:** make `test_proxy_environment_variables` more resilient ([a298056](https://github.com/brapi-dev/brapi-python/commit/a298056128baf138f8493c80d34ecc8d67af02fa)) +* **internal:** make `test_proxy_environment_variables` more resilient to env ([a2e60c5](https://github.com/brapi-dev/brapi-python/commit/a2e60c5bb3762cf3de9e7bb7d54a3e6b91a77fb4)) +* **internal:** remove mock server code ([02c10f5](https://github.com/brapi-dev/brapi-python/commit/02c10f56762ea1456bc03934ebddd6c6f78fef81)) +* update mock server docs ([4b7594f](https://github.com/brapi-dev/brapi-python/commit/4b7594fc083f530ddddeaa052a641efaccaf8d6b)) + ## 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) 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..b58cf46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "brapi" -version = "1.2.0" +version = "1.2.1" description = "The official Python library for the brapi API" dynamic = ["readme"] license = "Apache-2.0" @@ -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/src/brapi/_version.py b/src/brapi/_version.py index 165bd5b..a22f200 100644 --- a/src/brapi/_version.py +++ b/src/brapi/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "brapi" -__version__ = "1.2.0" # x-release-please-version +__version__ = "1.2.1" # x-release-please-version 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()