diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a15f2553..d60bafb6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,12 +7,17 @@ on: - 'integrated/**' - 'stl-preview-head/**' - 'stl-preview-base/**' + pull_request: + branches-ignore: + - 'stl-preview-head/**' + - 'stl-preview-base/**' jobs: lint: timeout-minutes: 10 name: lint runs-on: ${{ github.repository == 'stainless-sdks/gitpod-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - uses: actions/checkout@v4 @@ -30,24 +35,40 @@ jobs: - name: Run lints run: ./scripts/lint - upload: - if: github.repository == 'stainless-sdks/gitpod-python' + build: + if: github.event_name == 'push' || github.event.pull_request.head.repo.fork timeout-minutes: 10 - name: upload + name: build permissions: contents: read id-token: write - runs-on: depot-ubuntu-24.04 + runs-on: ${{ github.repository == 'stainless-sdks/gitpod-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} steps: - uses: actions/checkout@v4 + - name: Install Rye + run: | + curl -sSf https://rye.astral.sh/get | bash + echo "$HOME/.rye/shims" >> $GITHUB_PATH + env: + RYE_VERSION: '0.44.0' + RYE_INSTALL_OPTION: '--yes' + + - name: Install dependencies + run: rye sync --all-features + + - name: Run build + run: rye build + - name: Get GitHub OIDC Token + if: github.repository == 'stainless-sdks/gitpod-python' id: github-oidc uses: actions/github-script@v6 with: script: core.setOutput('github_token', await core.getIDToken()); - name: Upload tarball + if: github.repository == 'stainless-sdks/gitpod-python' env: URL: https://pkg.stainless.com/s AUTH: ${{ steps.github-oidc.outputs.github_token }} @@ -58,6 +79,7 @@ jobs: timeout-minutes: 10 name: test runs-on: ${{ github.repository == 'stainless-sdks/gitpod-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - uses: actions/checkout@v4 diff --git a/.gitignore b/.gitignore index 87797408..95ceb189 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ .prism.log -.vscode _dev __pycache__ diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6b7b74c5..da59f99e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.3.0" + ".": "0.4.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index d375176e..d2b21929 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 119 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-ca9a49ac7fbb63f55611fd7cd48a22a3ff8b38a797125c8513e891d9b7345550.yml openapi_spec_hash: fd6ffbdfaefcc555e61ca1c565e05214 -config_hash: bb9d0a0bdadbee0985dd7c1e4f0e9e8a +config_hash: 6e0a070326b83dc6e5544baae3d14bbb diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..5b010307 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.analysis.importFormat": "relative", +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 860b8fc9..1178c9b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,56 @@ # Changelog +## 0.4.0 (2025-12-05) + +Full Changelog: [v0.3.0...v0.4.0](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.3.0...v0.4.0) + +### Features + +* **api:** gitpod -> ona ([5ddf83b](https://github.com/gitpod-io/gitpod-sdk-python/commit/5ddf83b265d51f812b239afd3d9255f7fa8d2b6b)) +* clean up environment call outs ([213fcdc](https://github.com/gitpod-io/gitpod-sdk-python/commit/213fcdc66361c6d258cb899f5ddbf56a1ebdaa62)) +* **client:** add support for aiohttp ([9eeac4b](https://github.com/gitpod-io/gitpod-sdk-python/commit/9eeac4b8aa2066f8bd5a3720d13560ea0c031041)) +* **client:** support file upload requests ([f986b23](https://github.com/gitpod-io/gitpod-sdk-python/commit/f986b231a55b031c7e6823d7ffc23e73c33afc72)) +* improve future compat with pydantic v3 ([a52c037](https://github.com/gitpod-io/gitpod-sdk-python/commit/a52c03745925595327a938a16be5715d9675c9b6)) + + +### Bug Fixes + +* **ci:** correct conditional ([ee5b628](https://github.com/gitpod-io/gitpod-sdk-python/commit/ee5b628bf87cbb5844c4f1cc69e10f5a2bb1338f)) +* **ci:** release-doctor — report correct token name ([0961324](https://github.com/gitpod-io/gitpod-sdk-python/commit/096132446b6f5672966ccdfce6d4eb007ee45773)) +* **client:** correctly parse binary response | stream ([133ddee](https://github.com/gitpod-io/gitpod-sdk-python/commit/133ddeed84282ff4c41b9800cfa4e97951f7d207)) +* **client:** don't send Content-Type header on GET requests ([92025c1](https://github.com/gitpod-io/gitpod-sdk-python/commit/92025c1f3b8d41d4c14b1217c6bfdd866ad89520)) +* **parsing:** correctly handle nested discriminated unions ([f95762d](https://github.com/gitpod-io/gitpod-sdk-python/commit/f95762d56e17f372a2610c9dbbf7228401e18889)) +* **parsing:** ignore empty metadata ([3901ec7](https://github.com/gitpod-io/gitpod-sdk-python/commit/3901ec7e4d11d8b3d2848cd3c28f1a64a203a5a3)) +* **parsing:** parse extra field types ([e10d4fb](https://github.com/gitpod-io/gitpod-sdk-python/commit/e10d4fbc40758f2e00d81c52e269142de7ecf7d6)) +* **tests:** fix: tests which call HTTP endpoints directly with the example parameters ([8a35255](https://github.com/gitpod-io/gitpod-sdk-python/commit/8a35255e8a9a579a5a2d014810d017dbcdeea87f)) + + +### Chores + +* **ci:** change upload type ([7801ba9](https://github.com/gitpod-io/gitpod-sdk-python/commit/7801ba9fe808fd6cd3088e1269f9dc4a00f169eb)) +* **ci:** enable for pull requests ([615015e](https://github.com/gitpod-io/gitpod-sdk-python/commit/615015ecefc10a68d421f7f18eb8466e4afcfa10)) +* **ci:** only run for pushes and fork pull requests ([8e3cd30](https://github.com/gitpod-io/gitpod-sdk-python/commit/8e3cd300ad4d0ff35b073c0aa98e46e537a299f6)) +* **internal:** bump pinned h11 dep ([c55a48c](https://github.com/gitpod-io/gitpod-sdk-python/commit/c55a48c67150a3580a6dad3ff80996c6e4ae2847)) +* **internal:** codegen related update ([e2efcf5](https://github.com/gitpod-io/gitpod-sdk-python/commit/e2efcf5c5289ada60c32c36d59987d933e40a6c6)) +* **internal:** fix ruff target version ([d6156d2](https://github.com/gitpod-io/gitpod-sdk-python/commit/d6156d2ab264178dda14f8eed4496c3ff420fa94)) +* **internal:** move mypy configurations to `pyproject.toml` file ([20ff2fd](https://github.com/gitpod-io/gitpod-sdk-python/commit/20ff2fdec396b41c230fd6f7ab6ffee8054e7b46)) +* **internal:** update comment in script ([1aeeb0f](https://github.com/gitpod-io/gitpod-sdk-python/commit/1aeeb0fe71f4f10a76875770061da7e87c0bd000)) +* **internal:** update conftest.py ([e1f69f3](https://github.com/gitpod-io/gitpod-sdk-python/commit/e1f69f382a1d5f99e71aa2e2ae559644f71b4352)) +* **package:** mark python 3.13 as supported ([e580a61](https://github.com/gitpod-io/gitpod-sdk-python/commit/e580a61a67bba85d36aa04e99090a482de6a85a2)) +* **project:** add settings file for vscode ([8ec9f41](https://github.com/gitpod-io/gitpod-sdk-python/commit/8ec9f413960970c9c46272d775e85b7cd2159a4c)) +* **readme:** fix version rendering on pypi ([de1172d](https://github.com/gitpod-io/gitpod-sdk-python/commit/de1172d8dd3411f9ff5bf3e87c42c2c57ad1e602)) +* **readme:** update badges ([2417444](https://github.com/gitpod-io/gitpod-sdk-python/commit/24174444a9b9ce67f5ef4590633f0380f2f7efee)) +* **tests:** add tests for httpx client instantiation & proxies ([c03af6e](https://github.com/gitpod-io/gitpod-sdk-python/commit/c03af6ee2abc77132eda9ffad9e31a49e2dd59fb)) +* **tests:** run tests in parallel ([6e0ed60](https://github.com/gitpod-io/gitpod-sdk-python/commit/6e0ed6062d5db6d5565b953c9991c0e8598775e1)) +* **tests:** simplify `get_platform` test ([4726cc5](https://github.com/gitpod-io/gitpod-sdk-python/commit/4726cc56e22ec7883d51d433fda688679fe9d957)) +* **tests:** skip some failing tests on the latest python versions ([4735291](https://github.com/gitpod-io/gitpod-sdk-python/commit/473529172a90e9ca731e0f9fc3ab881e4957d946)) +* update @stainless-api/prism-cli to v5.15.0 ([3918e98](https://github.com/gitpod-io/gitpod-sdk-python/commit/3918e98029a9a2e1381f1488c75c14d8e3e16bbd)) + + +### Documentation + +* **client:** fix httpx.Timeout documentation reference ([28e4f0d](https://github.com/gitpod-io/gitpod-sdk-python/commit/28e4f0da8237a7823e79b9beea870e9689261d57)) + ## 0.3.0 (2025-06-06) Full Changelog: [v0.2.1...v0.3.0](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.2.1...v0.3.0) diff --git a/README.md b/README.md index f4421881..ccfdae1d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Gitpod Python API library -[![PyPI version](https://img.shields.io/pypi/v/gitpod-sdk.svg)](https://pypi.org/project/gitpod-sdk/) + +[![PyPI version](https://img.shields.io/pypi/v/gitpod-sdk.svg?label=pypi%20(stable))](https://pypi.org/project/gitpod-sdk/) The Gitpod Python library provides convenient access to the Gitpod REST API from any Python 3.8+ application. The library includes type definitions for all request params and response fields, @@ -10,7 +11,7 @@ It is generated with [Stainless](https://www.stainless.com/). ## Documentation -The REST API documentation can be found on [docs.gitpod.io](https://docs.gitpod.io). The full API of this library can be found in [api.md](api.md). +The REST API documentation can be found on [docs.ona.com](https://docs.ona.com). The full API of this library can be found in [api.md](api.md). ## Installation @@ -64,6 +65,37 @@ asyncio.run(main()) Functionality between the synchronous and asynchronous clients is otherwise identical. +### With aiohttp + +By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend. + +You can enable this by installing `aiohttp`: + +```sh +# install from PyPI +pip install gitpod-sdk[aiohttp] +``` + +Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`: + +```python +import asyncio +from gitpod import DefaultAioHttpClient +from gitpod import AsyncGitpod + + +async def main() -> None: + async with AsyncGitpod( + bearer_token="My Bearer Token", + http_client=DefaultAioHttpClient(), + ) as client: + response = await client.identity.get_authenticated_identity() + print(response.organization_id) + + +asyncio.run(main()) +``` + ## Using types Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like: @@ -216,7 +248,7 @@ client.with_options(max_retries=5).identity.get_authenticated_identity() ### Timeouts By default requests time out after 1 minute. You can configure this with a `timeout` option, -which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object: +which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object: ```python from gitpod import Gitpod diff --git a/SECURITY.md b/SECURITY.md index efd90888..8975e827 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -20,7 +20,7 @@ or products provided by Gitpod, please follow the respective company's security ### Gitpod Terms and Policies -Please contact dev-feedback@gitpod.com for any questions or concerns regarding the security of our services. +Please contact dev-feedback@ona.com for any questions or concerns regarding the security of our services. --- diff --git a/bin/check-release-environment b/bin/check-release-environment index 374fdaea..b845b0f4 100644 --- a/bin/check-release-environment +++ b/bin/check-release-environment @@ -3,7 +3,7 @@ errors=() if [ -z "${PYPI_TOKEN}" ]; then - errors+=("The GITPOD_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.") + errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.") fi lenErrors=${#errors[@]} diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index e2d13204..00000000 --- a/mypy.ini +++ /dev/null @@ -1,50 +0,0 @@ -[mypy] -pretty = True -show_error_codes = True - -# Exclude _files.py because mypy isn't smart enough to apply -# the correct type narrowing and as this is an internal module -# it's fine to just use Pyright. -# -# We also exclude our `tests` as mypy doesn't always infer -# types correctly and Pyright will still catch any type errors. -exclude = ^(src/gitpod/_files\.py|_dev/.*\.py|tests/.*)$ - -strict_equality = True -implicit_reexport = True -check_untyped_defs = True -no_implicit_optional = True - -warn_return_any = True -warn_unreachable = True -warn_unused_configs = True - -# Turn these options off as it could cause conflicts -# with the Pyright options. -warn_unused_ignores = False -warn_redundant_casts = False - -disallow_any_generics = True -disallow_untyped_defs = True -disallow_untyped_calls = True -disallow_subclassing_any = True -disallow_incomplete_defs = True -disallow_untyped_decorators = True -cache_fine_grained = True - -# By default, mypy reports an error if you assign a value to the result -# of a function call that doesn't return anything. We do this in our test -# cases: -# ``` -# result = ... -# assert result is None -# ``` -# Changing this codegen to make mypy happy would increase complexity -# and would not be worth it. -disable_error_code = func-returns-value,overload-cannot-match - -# https://github.com/python/mypy/issues/12162 -[mypy.overrides] -module = "black.files.*" -ignore_errors = true -ignore_missing_imports = true diff --git a/pyproject.toml b/pyproject.toml index 475cce5b..72a55206 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,11 @@ [project] name = "gitpod-sdk" -version = "0.3.0" +version = "0.4.0" description = "The official Python library for the gitpod API" dynamic = ["readme"] license = "Apache-2.0" authors = [ -{ name = "Gitpod", email = "dev-feedback@gitpod.com" }, +{ name = "Gitpod", email = "dev-feedback@ona.com" }, ] dependencies = [ "httpx>=0.23.0, <1", @@ -24,6 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: MacOS", @@ -37,6 +38,8 @@ classifiers = [ Homepage = "https://github.com/gitpod-io/gitpod-sdk-python" Repository = "https://github.com/gitpod-io/gitpod-sdk-python" +[project.optional-dependencies] +aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"] [tool.rye] managed = true @@ -53,7 +56,7 @@ dev-dependencies = [ "dirty-equals>=0.6.0", "importlib-metadata>=6.7.0", "rich>=13.7.1", - "nest_asyncio==1.6.0", + "pytest-xdist>=3.6.1", "paramiko>=3.5.1", "anthropic>=0.45.2", "types-paramiko>=3.5.0.20240928", @@ -128,7 +131,7 @@ replacement = '[\1](https://github.com/gitpod-io/gitpod-sdk-python/tree/main/\g< [tool.pytest.ini_options] testpaths = ["tests"] -addopts = "--tb=short" +addopts = "--tb=short -n auto" xfail_strict = true asyncio_mode = "auto" asyncio_default_fixture_loop_scope = "session" @@ -147,6 +150,7 @@ exclude = [ "_dev", ".venv", ".nox", + ".git", ] reportImplicitOverride = true @@ -155,10 +159,62 @@ reportOverlappingOverload = false reportImportCycles = false reportPrivateUsage = false +[tool.mypy] +pretty = true +show_error_codes = true + +# Exclude _files.py because mypy isn't smart enough to apply +# the correct type narrowing and as this is an internal module +# it's fine to just use Pyright. +# +# We also exclude our `tests` as mypy doesn't always infer +# types correctly and Pyright will still catch any type errors. +exclude = ['src/gitpod/_files.py', '_dev/.*.py', 'tests/.*'] + +strict_equality = true +implicit_reexport = true +check_untyped_defs = true +no_implicit_optional = true + +warn_return_any = true +warn_unreachable = true +warn_unused_configs = true + +# Turn these options off as it could cause conflicts +# with the Pyright options. +warn_unused_ignores = false +warn_redundant_casts = false + +disallow_any_generics = true +disallow_untyped_defs = true +disallow_untyped_calls = true +disallow_subclassing_any = true +disallow_incomplete_defs = true +disallow_untyped_decorators = true +cache_fine_grained = true + +# By default, mypy reports an error if you assign a value to the result +# of a function call that doesn't return anything. We do this in our test +# cases: +# ``` +# result = ... +# assert result is None +# ``` +# Changing this codegen to make mypy happy would increase complexity +# and would not be worth it. +disable_error_code = "func-returns-value,overload-cannot-match" + +# https://github.com/python/mypy/issues/12162 +[[tool.mypy.overrides]] +module = "black.files.*" +ignore_errors = true +ignore_missing_imports = true + + [tool.ruff] line-length = 120 output-format = "grouped" -target-version = "py37" +target-version = "py38" [tool.ruff.format] docstring-code-format = true diff --git a/requirements-dev.lock b/requirements-dev.lock index ade760fe..191d3255 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -10,6 +10,13 @@ # universal: false -e file:. +aiohappyeyeballs==2.6.1 + # via aiohttp +aiohttp==3.12.8 + # via gitpod-sdk + # via httpx-aiohttp +aiosignal==1.3.2 + # via aiohttp annotated-types==0.6.0 # via pydantic anthropic==0.45.2 @@ -19,6 +26,10 @@ anyio==4.4.0 # via httpx argcomplete==3.1.2 # via nox +async-timeout==5.0.1 + # via aiohttp +attrs==25.3.0 + # via aiohttp bcrypt==4.2.1 # via paramiko certifi==2023.7.22 @@ -41,19 +52,28 @@ distro==1.8.0 exceptiongroup==1.2.2 # via anyio # via pytest +execnet==2.1.1 + # via pytest-xdist filelock==3.12.4 # via virtualenv -h11==0.14.0 +frozenlist==1.6.2 + # via aiohttp + # via aiosignal +h11==0.16.0 # via httpcore -httpcore==1.0.2 +httpcore==1.0.9 # via httpx httpx==0.28.1 # via anthropic # via gitpod-sdk + # via httpx-aiohttp # via respx +httpx-aiohttp==0.1.8 + # via gitpod-sdk idna==3.4 # via anyio # via httpx + # via yarl importlib-metadata==7.0.0 iniconfig==2.0.0 # via pytest @@ -63,10 +83,12 @@ markdown-it-py==3.0.0 # via rich mdurl==0.1.2 # via markdown-it-py +multidict==6.4.4 + # via aiohttp + # via yarl mypy==1.14.1 mypy-extensions==1.0.0 # via mypy -nest-asyncio==1.6.0 nodeenv==1.8.0 # via pyright nox==2023.4.22 @@ -78,6 +100,9 @@ platformdirs==3.11.0 # via virtualenv pluggy==1.5.0 # via pytest +propcache==0.3.1 + # via aiohttp + # via yarl pycparser==2.22 # via cffi pydantic==2.10.3 @@ -92,7 +117,9 @@ pynacl==1.5.0 pyright==1.1.399 pytest==8.3.3 # via pytest-asyncio + # via pytest-xdist pytest-asyncio==0.24.0 +pytest-xdist==3.7.0 python-dateutil==2.8.2 # via time-machine pytz==2023.3.post1 @@ -117,11 +144,14 @@ typing-extensions==4.12.2 # via anthropic # via anyio # via gitpod-sdk + # via multidict # via mypy # via pydantic # via pydantic-core # via pyright virtualenv==20.24.5 # via nox +yarl==1.20.0 + # via aiohttp zipp==3.17.0 # via importlib-metadata diff --git a/requirements.lock b/requirements.lock index b542a715..c0455c90 100644 --- a/requirements.lock +++ b/requirements.lock @@ -10,11 +10,22 @@ # universal: false -e file:. +aiohappyeyeballs==2.6.1 + # via aiohttp +aiohttp==3.12.8 + # via gitpod-sdk + # via httpx-aiohttp +aiosignal==1.3.2 + # via aiohttp annotated-types==0.6.0 # via pydantic anyio==4.4.0 # via gitpod-sdk # via httpx +async-timeout==5.0.1 + # via aiohttp +attrs==25.3.0 + # via aiohttp certifi==2023.7.22 # via httpcore # via httpx @@ -22,15 +33,28 @@ distro==1.8.0 # via gitpod-sdk exceptiongroup==1.2.2 # via anyio -h11==0.14.0 +frozenlist==1.6.2 + # via aiohttp + # via aiosignal +h11==0.16.0 # via httpcore -httpcore==1.0.2 +httpcore==1.0.9 # via httpx httpx==0.28.1 # via gitpod-sdk + # via httpx-aiohttp +httpx-aiohttp==0.1.8 + # via gitpod-sdk idna==3.4 # via anyio # via httpx + # via yarl +multidict==6.4.4 + # via aiohttp + # via yarl +propcache==0.3.1 + # via aiohttp + # via yarl pydantic==2.10.3 # via gitpod-sdk pydantic-core==2.27.1 @@ -41,5 +65,8 @@ sniffio==1.3.0 typing-extensions==4.12.2 # via anyio # via gitpod-sdk + # via multidict # via pydantic # via pydantic-core +yarl==1.20.0 + # via aiohttp diff --git a/scripts/mock b/scripts/mock index d2814ae6..0b28f6ea 100755 --- a/scripts/mock +++ b/scripts/mock @@ -21,7 +21,7 @@ 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.8.5 -- prism mock "$URL" &> .prism.log & + 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" @@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" fi diff --git a/scripts/test b/scripts/test index 2b878456..dbeda2d2 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! prism_is_running ; then 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=@stoplight/prism-cli@~5.3.2 -- prism mock path/to/your.openapi.yml${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}" echo exit 1 diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh index f50929ab..ea682938 100755 --- a/scripts/utils/upload-artifact.sh +++ b/scripts/utils/upload-artifact.sh @@ -1,7 +1,9 @@ #!/usr/bin/env bash set -exuo pipefail -RESPONSE=$(curl -X POST "$URL" \ +FILENAME=$(basename dist/*.whl) + +RESPONSE=$(curl -X POST "$URL?filename=$FILENAME" \ -H "Authorization: Bearer $AUTH" \ -H "Content-Type: application/json") @@ -12,13 +14,13 @@ if [[ "$SIGNED_URL" == "null" ]]; then exit 1 fi -UPLOAD_RESPONSE=$(tar -cz . | curl -v -X PUT \ - -H "Content-Type: application/gzip" \ - --data-binary @- "$SIGNED_URL" 2>&1) +UPLOAD_RESPONSE=$(curl -v -X PUT \ + -H "Content-Type: binary/octet-stream" \ + --data-binary "@dist/$FILENAME" "$SIGNED_URL" 2>&1) if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then echo -e "\033[32mUploaded build to Stainless storage.\033[0m" - echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/gitpod-python/$SHA'\033[0m" + echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/gitpod-python/$SHA/$FILENAME'\033[0m" else echo -e "\033[31mFailed to upload artifact.\033[0m" exit 1 diff --git a/src/gitpod/__init__.py b/src/gitpod/__init__.py index ce63e16c..f2a5eb27 100644 --- a/src/gitpod/__init__.py +++ b/src/gitpod/__init__.py @@ -26,7 +26,7 @@ UnprocessableEntityError, APIResponseValidationError, ) -from ._base_client import DefaultHttpxClient, DefaultAsyncHttpxClient +from ._base_client import DefaultHttpxClient, DefaultAioHttpClient, DefaultAsyncHttpxClient from ._utils._logs import setup_logging as _setup_logging __all__ = [ @@ -68,6 +68,7 @@ "DEFAULT_CONNECTION_LIMITS", "DefaultHttpxClient", "DefaultAsyncHttpxClient", + "DefaultAioHttpClient", ] if not _t.TYPE_CHECKING: diff --git a/src/gitpod/_base_client.py b/src/gitpod/_base_client.py index 34005d22..14ac3c4c 100644 --- a/src/gitpod/_base_client.py +++ b/src/gitpod/_base_client.py @@ -59,7 +59,7 @@ ModelBuilderProtocol, ) from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping -from ._compat import PYDANTIC_V2, model_copy, model_dump +from ._compat import PYDANTIC_V1, model_copy, model_dump from ._models import GenericModel, FinalRequestOptions, validate_type, construct_type from ._response import ( APIResponse, @@ -232,7 +232,7 @@ def _set_private_attributes( model: Type[_T], options: FinalRequestOptions, ) -> None: - if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None: + if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None: self.__pydantic_private__ = {} self._model = model @@ -320,7 +320,7 @@ def _set_private_attributes( client: AsyncAPIClient, options: FinalRequestOptions, ) -> None: - if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None: + if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None: self.__pydantic_private__ = {} self._model = model @@ -529,6 +529,18 @@ def _build_request( # work around https://github.com/encode/httpx/discussions/2880 kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")} + is_body_allowed = options.method.lower() != "get" + + if is_body_allowed: + if isinstance(json_data, bytes): + kwargs["content"] = json_data + else: + kwargs["json"] = json_data if is_given(json_data) else None + kwargs["files"] = files + else: + headers.pop("Content-Type", None) + kwargs.pop("data", None) + # TODO: report this error to httpx return self._client.build_request( # pyright: ignore[reportUnknownMemberType] headers=headers, @@ -540,8 +552,6 @@ def _build_request( # so that passing a `TypedDict` doesn't cause an error. # https://github.com/microsoft/pyright/issues/3526#event-6715453066 params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None, - json=json_data if is_given(json_data) else None, - files=files, **kwargs, ) @@ -1071,7 +1081,14 @@ def _process_response( ) -> ResponseT: origin = get_origin(cast_to) or cast_to - if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse): + if ( + inspect.isclass(origin) + and issubclass(origin, BaseAPIResponse) + # we only want to actually return the custom BaseAPIResponse class if we're + # returning the raw response, or if we're not streaming SSE, as if we're streaming + # SSE then `cast_to` doesn't actively reflect the type we need to parse into + and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER))) + ): if not issubclass(origin, APIResponse): raise TypeError(f"API Response types must subclass {APIResponse}; Received {origin}") @@ -1282,6 +1299,24 @@ def __init__(self, **kwargs: Any) -> None: super().__init__(**kwargs) +try: + import httpx_aiohttp +except ImportError: + + class _DefaultAioHttpClient(httpx.AsyncClient): + def __init__(self, **_kwargs: Any) -> None: + raise RuntimeError("To use the aiohttp client you must have installed the package with the `aiohttp` extra") +else: + + class _DefaultAioHttpClient(httpx_aiohttp.HttpxAiohttpClient): # type: ignore + def __init__(self, **kwargs: Any) -> None: + kwargs.setdefault("timeout", DEFAULT_TIMEOUT) + kwargs.setdefault("limits", DEFAULT_CONNECTION_LIMITS) + kwargs.setdefault("follow_redirects", True) + + super().__init__(**kwargs) + + if TYPE_CHECKING: DefaultAsyncHttpxClient = httpx.AsyncClient """An alias to `httpx.AsyncClient` that provides the same defaults that this SDK @@ -1290,8 +1325,12 @@ def __init__(self, **kwargs: Any) -> None: This is useful because overriding the `http_client` with your own instance of `httpx.AsyncClient` will result in httpx's defaults being used, not ours. """ + + DefaultAioHttpClient = httpx.AsyncClient + """An alias to `httpx.AsyncClient` that changes the default HTTP transport to `aiohttp`.""" else: DefaultAsyncHttpxClient = _DefaultAsyncHttpxClient + DefaultAioHttpClient = _DefaultAioHttpClient class AsyncHttpxClientWrapper(DefaultAsyncHttpxClient): @@ -1574,7 +1613,14 @@ async def _process_response( ) -> ResponseT: origin = get_origin(cast_to) or cast_to - if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse): + if ( + inspect.isclass(origin) + and issubclass(origin, BaseAPIResponse) + # we only want to actually return the custom BaseAPIResponse class if we're + # returning the raw response, or if we're not streaming SSE, as if we're streaming + # SSE then `cast_to` doesn't actively reflect the type we need to parse into + and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER))) + ): if not issubclass(origin, AsyncAPIResponse): raise TypeError(f"API Response types must subclass {AsyncAPIResponse}; Received {origin}") diff --git a/src/gitpod/_compat.py b/src/gitpod/_compat.py index 92d9ee61..bdef67f0 100644 --- a/src/gitpod/_compat.py +++ b/src/gitpod/_compat.py @@ -12,14 +12,13 @@ _T = TypeVar("_T") _ModelT = TypeVar("_ModelT", bound=pydantic.BaseModel) -# --------------- Pydantic v2 compatibility --------------- +# --------------- Pydantic v2, v3 compatibility --------------- # Pyright incorrectly reports some of our functions as overriding a method when they don't # pyright: reportIncompatibleMethodOverride=false -PYDANTIC_V2 = pydantic.VERSION.startswith("2.") +PYDANTIC_V1 = pydantic.VERSION.startswith("1.") -# v1 re-exports if TYPE_CHECKING: def parse_date(value: date | StrBytesIntFloat) -> date: # noqa: ARG001 @@ -44,90 +43,92 @@ def is_typeddict(type_: type[Any]) -> bool: # noqa: ARG001 ... else: - if PYDANTIC_V2: - from pydantic.v1.typing import ( + # v1 re-exports + if PYDANTIC_V1: + from pydantic.typing import ( get_args as get_args, is_union as is_union, get_origin as get_origin, is_typeddict as is_typeddict, is_literal_type as is_literal_type, ) - from pydantic.v1.datetime_parse import parse_date as parse_date, parse_datetime as parse_datetime + from pydantic.datetime_parse import parse_date as parse_date, parse_datetime as parse_datetime else: - from pydantic.typing import ( + from ._utils import ( get_args as get_args, is_union as is_union, get_origin as get_origin, + parse_date as parse_date, is_typeddict as is_typeddict, + parse_datetime as parse_datetime, is_literal_type as is_literal_type, ) - from pydantic.datetime_parse import parse_date as parse_date, parse_datetime as parse_datetime # refactored config if TYPE_CHECKING: from pydantic import ConfigDict as ConfigDict else: - if PYDANTIC_V2: - from pydantic import ConfigDict - else: + if PYDANTIC_V1: # TODO: provide an error message here? ConfigDict = None + else: + from pydantic import ConfigDict as ConfigDict # renamed methods / properties def parse_obj(model: type[_ModelT], value: object) -> _ModelT: - if PYDANTIC_V2: - return model.model_validate(value) - else: + if PYDANTIC_V1: return cast(_ModelT, model.parse_obj(value)) # pyright: ignore[reportDeprecated, reportUnnecessaryCast] + else: + return model.model_validate(value) def field_is_required(field: FieldInfo) -> bool: - if PYDANTIC_V2: - return field.is_required() - return field.required # type: ignore + if PYDANTIC_V1: + return field.required # type: ignore + return field.is_required() def field_get_default(field: FieldInfo) -> Any: value = field.get_default() - if PYDANTIC_V2: - from pydantic_core import PydanticUndefined - - if value == PydanticUndefined: - return None + if PYDANTIC_V1: return value + from pydantic_core import PydanticUndefined + + if value == PydanticUndefined: + return None return value def field_outer_type(field: FieldInfo) -> Any: - if PYDANTIC_V2: - return field.annotation - return field.outer_type_ # type: ignore + if PYDANTIC_V1: + return field.outer_type_ # type: ignore + return field.annotation def get_model_config(model: type[pydantic.BaseModel]) -> Any: - if PYDANTIC_V2: - return model.model_config - return model.__config__ # type: ignore + if PYDANTIC_V1: + return model.__config__ # type: ignore + return model.model_config def get_model_fields(model: type[pydantic.BaseModel]) -> dict[str, FieldInfo]: - if PYDANTIC_V2: - return model.model_fields - return model.__fields__ # type: ignore + if PYDANTIC_V1: + return model.__fields__ # type: ignore + return model.model_fields def model_copy(model: _ModelT, *, deep: bool = False) -> _ModelT: - if PYDANTIC_V2: - return model.model_copy(deep=deep) - return model.copy(deep=deep) # type: ignore + if PYDANTIC_V1: + return model.copy(deep=deep) # type: ignore + return model.model_copy(deep=deep) def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str: - if PYDANTIC_V2: - return model.model_dump_json(indent=indent) - return model.json(indent=indent) # type: ignore + if PYDANTIC_V1: + return model.json(indent=indent) # type: ignore + return model.model_dump_json(indent=indent) def model_dump( @@ -139,14 +140,14 @@ def model_dump( warnings: bool = True, mode: Literal["json", "python"] = "python", ) -> dict[str, Any]: - if PYDANTIC_V2 or hasattr(model, "model_dump"): + if (not PYDANTIC_V1) or hasattr(model, "model_dump"): return model.model_dump( mode=mode, exclude=exclude, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, # warnings are not supported in Pydantic v1 - warnings=warnings if PYDANTIC_V2 else True, + warnings=True if PYDANTIC_V1 else warnings, ) return cast( "dict[str, Any]", @@ -159,9 +160,9 @@ def model_dump( def model_parse(model: type[_ModelT], data: Any) -> _ModelT: - if PYDANTIC_V2: - return model.model_validate(data) - return model.parse_obj(data) # pyright: ignore[reportDeprecated] + if PYDANTIC_V1: + return model.parse_obj(data) # pyright: ignore[reportDeprecated] + return model.model_validate(data) # generic models @@ -170,17 +171,16 @@ def model_parse(model: type[_ModelT], data: Any) -> _ModelT: class GenericModel(pydantic.BaseModel): ... else: - if PYDANTIC_V2: + if PYDANTIC_V1: + import pydantic.generics + + class GenericModel(pydantic.generics.GenericModel, pydantic.BaseModel): ... + else: # there no longer needs to be a distinction in v2 but # we still have to create our own subclass to avoid # inconsistent MRO ordering errors class GenericModel(pydantic.BaseModel): ... - else: - import pydantic.generics - - class GenericModel(pydantic.generics.GenericModel, pydantic.BaseModel): ... - # cached properties if TYPE_CHECKING: diff --git a/src/gitpod/_files.py b/src/gitpod/_files.py index 715cc207..cc14c14f 100644 --- a/src/gitpod/_files.py +++ b/src/gitpod/_files.py @@ -69,12 +69,12 @@ def _transform_file(file: FileTypes) -> HttpxFileTypes: return file if is_tuple_t(file): - return (file[0], _read_file_content(file[1]), *file[2:]) + return (file[0], read_file_content(file[1]), *file[2:]) raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple") -def _read_file_content(file: FileContent) -> HttpxFileContent: +def read_file_content(file: FileContent) -> HttpxFileContent: if isinstance(file, os.PathLike): return pathlib.Path(file).read_bytes() return file @@ -111,12 +111,12 @@ async def _async_transform_file(file: FileTypes) -> HttpxFileTypes: return file if is_tuple_t(file): - return (file[0], await _async_read_file_content(file[1]), *file[2:]) + return (file[0], await async_read_file_content(file[1]), *file[2:]) raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple") -async def _async_read_file_content(file: FileContent) -> HttpxFileContent: +async def async_read_file_content(file: FileContent) -> HttpxFileContent: if isinstance(file, os.PathLike): return await anyio.Path(file).read_bytes() diff --git a/src/gitpod/_models.py b/src/gitpod/_models.py index 4f214980..3a6017ef 100644 --- a/src/gitpod/_models.py +++ b/src/gitpod/_models.py @@ -2,9 +2,10 @@ import os import inspect -from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, cast +from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast from datetime import date, datetime from typing_extensions import ( + List, Unpack, Literal, ClassVar, @@ -49,7 +50,7 @@ strip_annotated_type, ) from ._compat import ( - PYDANTIC_V2, + PYDANTIC_V1, ConfigDict, GenericModel as BaseGenericModel, get_args, @@ -80,11 +81,7 @@ class _ConfigProtocol(Protocol): class BaseModel(pydantic.BaseModel): - if PYDANTIC_V2: - model_config: ClassVar[ConfigDict] = ConfigDict( - extra="allow", defer_build=coerce_boolean(os.environ.get("DEFER_PYDANTIC_BUILD", "true")) - ) - else: + if PYDANTIC_V1: @property @override @@ -94,6 +91,10 @@ def model_fields_set(self) -> set[str]: class Config(pydantic.BaseConfig): # pyright: ignore[reportDeprecated] extra: Any = pydantic.Extra.allow # type: ignore + else: + model_config: ClassVar[ConfigDict] = ConfigDict( + extra="allow", defer_build=coerce_boolean(os.environ.get("DEFER_PYDANTIC_BUILD", "true")) + ) def to_dict( self, @@ -207,28 +208,32 @@ def construct( # pyright: ignore[reportIncompatibleMethodOverride] else: fields_values[name] = field_get_default(field) + extra_field_type = _get_extra_fields_type(__cls) + _extra = {} for key, value in values.items(): if key not in model_fields: - if PYDANTIC_V2: - _extra[key] = value - else: + parsed = construct_type(value=value, type_=extra_field_type) if extra_field_type is not None else value + + if PYDANTIC_V1: _fields_set.add(key) - fields_values[key] = value + fields_values[key] = parsed + else: + _extra[key] = parsed object.__setattr__(m, "__dict__", fields_values) - if PYDANTIC_V2: - # these properties are copied from Pydantic's `model_construct()` method - object.__setattr__(m, "__pydantic_private__", None) - object.__setattr__(m, "__pydantic_extra__", _extra) - object.__setattr__(m, "__pydantic_fields_set__", _fields_set) - else: + if PYDANTIC_V1: # init_private_attributes() does not exist in v2 m._init_private_attributes() # type: ignore # copied from Pydantic v1's `construct()` method object.__setattr__(m, "__fields_set__", _fields_set) + else: + # these properties are copied from Pydantic's `model_construct()` method + object.__setattr__(m, "__pydantic_private__", None) + object.__setattr__(m, "__pydantic_extra__", _extra) + object.__setattr__(m, "__pydantic_fields_set__", _fields_set) return m @@ -238,7 +243,7 @@ def construct( # pyright: ignore[reportIncompatibleMethodOverride] # although not in practice model_construct = construct - if not PYDANTIC_V2: + if PYDANTIC_V1: # we define aliases for some of the new pydantic v2 methods so # that we can just document these methods without having to specify # a specific pydantic version as some users may not know which @@ -299,7 +304,7 @@ def model_dump( exclude_none=exclude_none, ) - return cast(dict[str, Any], json_safe(dumped)) if mode == "json" else dumped + return cast("dict[str, Any]", json_safe(dumped)) if mode == "json" else dumped @override def model_dump_json( @@ -358,15 +363,32 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object: if value is None: return field_get_default(field) - if PYDANTIC_V2: - type_ = field.annotation - else: + if PYDANTIC_V1: type_ = cast(type, field.outer_type_) # type: ignore + else: + type_ = field.annotation # type: ignore if type_ is None: raise RuntimeError(f"Unexpected field type is None for {key}") - return construct_type(value=value, type_=type_) + return construct_type(value=value, type_=type_, metadata=getattr(field, "metadata", None)) + + +def _get_extra_fields_type(cls: type[pydantic.BaseModel]) -> type | None: + if PYDANTIC_V1: + # TODO + return None + + schema = cls.__pydantic_core_schema__ + if schema["type"] == "model": + fields = schema["schema"] + if fields["type"] == "model-fields": + extras = fields.get("extras_schema") + if extras and "cls" in extras: + # mypy can't narrow the type + return extras["cls"] # type: ignore[no-any-return] + + return None def is_basemodel(type_: type) -> bool: @@ -420,7 +442,7 @@ def construct_type_unchecked(*, value: object, type_: type[_T]) -> _T: return cast(_T, construct_type(value=value, type_=type_)) -def construct_type(*, value: object, type_: object) -> object: +def construct_type(*, value: object, type_: object, metadata: Optional[List[Any]] = None) -> object: """Loose coercion to the expected type with construction of nested values. If the given value does not match the expected type then it is returned as-is. @@ -438,8 +460,10 @@ def construct_type(*, value: object, type_: object) -> object: type_ = type_.__value__ # type: ignore[unreachable] # unwrap `Annotated[T, ...]` -> `T` - if is_annotated_type(type_): - meta: tuple[Any, ...] = get_args(type_)[1:] + if metadata is not None and len(metadata) > 0: + meta: tuple[Any, ...] = tuple(metadata) + elif is_annotated_type(type_): + meta = get_args(type_)[1:] type_ = extract_type_arg(type_, 0) else: meta = tuple() @@ -604,30 +628,30 @@ def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any, for variant in get_args(union): variant = strip_annotated_type(variant) if is_basemodel_type(variant): - if PYDANTIC_V2: - field = _extract_field_schema_pv2(variant, discriminator_field_name) - if not field: + if PYDANTIC_V1: + field_info = cast("dict[str, FieldInfo]", variant.__fields__).get(discriminator_field_name) # pyright: ignore[reportDeprecated, reportUnnecessaryCast] + if not field_info: continue # Note: if one variant defines an alias then they all should - discriminator_alias = field.get("serialization_alias") - - field_schema = field["schema"] + discriminator_alias = field_info.alias - if field_schema["type"] == "literal": - for entry in cast("LiteralSchema", field_schema)["expected"]: + if (annotation := getattr(field_info, "annotation", None)) and is_literal_type(annotation): + for entry in get_args(annotation): if isinstance(entry, str): mapping[entry] = variant else: - field_info = cast("dict[str, FieldInfo]", variant.__fields__).get(discriminator_field_name) # pyright: ignore[reportDeprecated, reportUnnecessaryCast] - if not field_info: + field = _extract_field_schema_pv2(variant, discriminator_field_name) + if not field: continue # Note: if one variant defines an alias then they all should - discriminator_alias = field_info.alias + discriminator_alias = field.get("serialization_alias") - if (annotation := getattr(field_info, "annotation", None)) and is_literal_type(annotation): - for entry in get_args(annotation): + field_schema = field["schema"] + + if field_schema["type"] == "literal": + for entry in cast("LiteralSchema", field_schema)["expected"]: if isinstance(entry, str): mapping[entry] = variant @@ -690,7 +714,7 @@ class GenericModel(BaseGenericModel, BaseModel): pass -if PYDANTIC_V2: +if not PYDANTIC_V1: from pydantic import TypeAdapter as _TypeAdapter _CachedTypeAdapter = cast("TypeAdapter[object]", lru_cache(maxsize=None)(_TypeAdapter)) @@ -758,12 +782,12 @@ class FinalRequestOptions(pydantic.BaseModel): json_data: Union[Body, None] = None extra_json: Union[AnyMapping, None] = None - if PYDANTIC_V2: - model_config: ClassVar[ConfigDict] = ConfigDict(arbitrary_types_allowed=True) - else: + if PYDANTIC_V1: class Config(pydantic.BaseConfig): # pyright: ignore[reportDeprecated] arbitrary_types_allowed: bool = True + else: + model_config: ClassVar[ConfigDict] = ConfigDict(arbitrary_types_allowed=True) def get_max_retries(self, max_retries: int) -> int: if isinstance(self.max_retries, NotGiven): @@ -796,9 +820,9 @@ def construct( # type: ignore key: strip_not_given(value) for key, value in values.items() } - if PYDANTIC_V2: - return super().model_construct(_fields_set, **kwargs) - return cast(FinalRequestOptions, super().construct(_fields_set, **kwargs)) # pyright: ignore[reportDeprecated] + if PYDANTIC_V1: + return cast(FinalRequestOptions, super().construct(_fields_set, **kwargs)) # pyright: ignore[reportDeprecated] + return super().model_construct(_fields_set, **kwargs) if not TYPE_CHECKING: # type checkers incorrectly complain about this assignment diff --git a/src/gitpod/_types.py b/src/gitpod/_types.py index b5cea322..b5c5d596 100644 --- a/src/gitpod/_types.py +++ b/src/gitpod/_types.py @@ -13,10 +13,21 @@ Mapping, TypeVar, Callable, + Iterator, Optional, Sequence, ) -from typing_extensions import Set, Literal, Protocol, TypeAlias, TypedDict, override, runtime_checkable +from typing_extensions import ( + Set, + Literal, + Protocol, + TypeAlias, + TypedDict, + SupportsIndex, + overload, + override, + runtime_checkable, +) import httpx import pydantic @@ -217,3 +228,26 @@ class _GenericAlias(Protocol): class HttpxSendArgs(TypedDict, total=False): auth: httpx.Auth follow_redirects: bool + + +_T_co = TypeVar("_T_co", covariant=True) + + +if TYPE_CHECKING: + # This works because str.__contains__ does not accept object (either in typeshed or at runtime) + # https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285 + class SequenceNotStr(Protocol[_T_co]): + @overload + def __getitem__(self, index: SupportsIndex, /) -> _T_co: ... + @overload + def __getitem__(self, index: slice, /) -> Sequence[_T_co]: ... + def __contains__(self, value: object, /) -> bool: ... + def __len__(self) -> int: ... + def __iter__(self) -> Iterator[_T_co]: ... + def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ... + def count(self, value: Any, /) -> int: ... + def __reversed__(self) -> Iterator[_T_co]: ... +else: + # just point this to a normal `Sequence` at runtime to avoid having to special case + # deserializing our custom sequence type + SequenceNotStr = Sequence diff --git a/src/gitpod/_utils/__init__.py b/src/gitpod/_utils/__init__.py index d4fda26f..dc64e29a 100644 --- a/src/gitpod/_utils/__init__.py +++ b/src/gitpod/_utils/__init__.py @@ -10,7 +10,6 @@ lru_cache as lru_cache, is_mapping as is_mapping, is_tuple_t as is_tuple_t, - parse_date as parse_date, is_iterable as is_iterable, is_sequence as is_sequence, coerce_float as coerce_float, @@ -23,7 +22,6 @@ coerce_boolean as coerce_boolean, coerce_integer as coerce_integer, file_from_path as file_from_path, - parse_datetime as parse_datetime, strip_not_given as strip_not_given, deepcopy_minimal as deepcopy_minimal, get_async_library as get_async_library, @@ -32,12 +30,20 @@ maybe_coerce_boolean as maybe_coerce_boolean, maybe_coerce_integer as maybe_coerce_integer, ) +from ._compat import ( + get_args as get_args, + is_union as is_union, + get_origin as get_origin, + is_typeddict as is_typeddict, + is_literal_type as is_literal_type, +) from ._typing import ( is_list_type as is_list_type, is_union_type as is_union_type, extract_type_arg as extract_type_arg, is_iterable_type as is_iterable_type, is_required_type as is_required_type, + is_sequence_type as is_sequence_type, is_annotated_type as is_annotated_type, is_type_alias_type as is_type_alias_type, strip_annotated_type as strip_annotated_type, @@ -55,3 +61,4 @@ function_has_argument as function_has_argument, assert_signatures_in_sync as assert_signatures_in_sync, ) +from ._datetime_parse import parse_date as parse_date, parse_datetime as parse_datetime diff --git a/src/gitpod/_utils/_compat.py b/src/gitpod/_utils/_compat.py new file mode 100644 index 00000000..dd703233 --- /dev/null +++ b/src/gitpod/_utils/_compat.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +import sys +import typing_extensions +from typing import Any, Type, Union, Literal, Optional +from datetime import date, datetime +from typing_extensions import get_args as _get_args, get_origin as _get_origin + +from .._types import StrBytesIntFloat +from ._datetime_parse import parse_date as _parse_date, parse_datetime as _parse_datetime + +_LITERAL_TYPES = {Literal, typing_extensions.Literal} + + +def get_args(tp: type[Any]) -> tuple[Any, ...]: + return _get_args(tp) + + +def get_origin(tp: type[Any]) -> type[Any] | None: + return _get_origin(tp) + + +def is_union(tp: Optional[Type[Any]]) -> bool: + if sys.version_info < (3, 10): + return tp is Union # type: ignore[comparison-overlap] + else: + import types + + return tp is Union or tp is types.UnionType + + +def is_typeddict(tp: Type[Any]) -> bool: + return typing_extensions.is_typeddict(tp) + + +def is_literal_type(tp: Type[Any]) -> bool: + return get_origin(tp) in _LITERAL_TYPES + + +def parse_date(value: Union[date, StrBytesIntFloat]) -> date: + return _parse_date(value) + + +def parse_datetime(value: Union[datetime, StrBytesIntFloat]) -> datetime: + return _parse_datetime(value) diff --git a/src/gitpod/_utils/_datetime_parse.py b/src/gitpod/_utils/_datetime_parse.py new file mode 100644 index 00000000..7cb9d9e6 --- /dev/null +++ b/src/gitpod/_utils/_datetime_parse.py @@ -0,0 +1,136 @@ +""" +This file contains code from https://github.com/pydantic/pydantic/blob/main/pydantic/v1/datetime_parse.py +without the Pydantic v1 specific errors. +""" + +from __future__ import annotations + +import re +from typing import Dict, Union, Optional +from datetime import date, datetime, timezone, timedelta + +from .._types import StrBytesIntFloat + +date_expr = r"(?P\d{4})-(?P\d{1,2})-(?P\d{1,2})" +time_expr = ( + r"(?P\d{1,2}):(?P\d{1,2})" + r"(?::(?P\d{1,2})(?:\.(?P\d{1,6})\d{0,6})?)?" + r"(?PZ|[+-]\d{2}(?::?\d{2})?)?$" +) + +date_re = re.compile(f"{date_expr}$") +datetime_re = re.compile(f"{date_expr}[T ]{time_expr}") + + +EPOCH = datetime(1970, 1, 1) +# if greater than this, the number is in ms, if less than or equal it's in seconds +# (in seconds this is 11th October 2603, in ms it's 20th August 1970) +MS_WATERSHED = int(2e10) +# slightly more than datetime.max in ns - (datetime.max - EPOCH).total_seconds() * 1e9 +MAX_NUMBER = int(3e20) + + +def _get_numeric(value: StrBytesIntFloat, native_expected_type: str) -> Union[None, int, float]: + if isinstance(value, (int, float)): + return value + try: + return float(value) + except ValueError: + return None + except TypeError: + raise TypeError(f"invalid type; expected {native_expected_type}, string, bytes, int or float") from None + + +def _from_unix_seconds(seconds: Union[int, float]) -> datetime: + if seconds > MAX_NUMBER: + return datetime.max + elif seconds < -MAX_NUMBER: + return datetime.min + + while abs(seconds) > MS_WATERSHED: + seconds /= 1000 + dt = EPOCH + timedelta(seconds=seconds) + return dt.replace(tzinfo=timezone.utc) + + +def _parse_timezone(value: Optional[str]) -> Union[None, int, timezone]: + if value == "Z": + return timezone.utc + elif value is not None: + offset_mins = int(value[-2:]) if len(value) > 3 else 0 + offset = 60 * int(value[1:3]) + offset_mins + if value[0] == "-": + offset = -offset + return timezone(timedelta(minutes=offset)) + else: + return None + + +def parse_datetime(value: Union[datetime, StrBytesIntFloat]) -> datetime: + """ + Parse a datetime/int/float/string and return a datetime.datetime. + + This function supports time zone offsets. When the input contains one, + the output uses a timezone with a fixed offset from UTC. + + Raise ValueError if the input is well formatted but not a valid datetime. + Raise ValueError if the input isn't well formatted. + """ + if isinstance(value, datetime): + return value + + number = _get_numeric(value, "datetime") + if number is not None: + return _from_unix_seconds(number) + + if isinstance(value, bytes): + value = value.decode() + + assert not isinstance(value, (float, int)) + + match = datetime_re.match(value) + if match is None: + raise ValueError("invalid datetime format") + + kw = match.groupdict() + if kw["microsecond"]: + kw["microsecond"] = kw["microsecond"].ljust(6, "0") + + tzinfo = _parse_timezone(kw.pop("tzinfo")) + kw_: Dict[str, Union[None, int, timezone]] = {k: int(v) for k, v in kw.items() if v is not None} + kw_["tzinfo"] = tzinfo + + return datetime(**kw_) # type: ignore + + +def parse_date(value: Union[date, StrBytesIntFloat]) -> date: + """ + Parse a date/int/float/string and return a datetime.date. + + Raise ValueError if the input is well formatted but not a valid date. + Raise ValueError if the input isn't well formatted. + """ + if isinstance(value, date): + if isinstance(value, datetime): + return value.date() + else: + return value + + number = _get_numeric(value, "date") + if number is not None: + return _from_unix_seconds(number).date() + + if isinstance(value, bytes): + value = value.decode() + + assert not isinstance(value, (float, int)) + match = date_re.match(value) + if match is None: + raise ValueError("invalid date format") + + kw = {k: int(v) for k, v in match.groupdict().items()} + + try: + return date(**kw) + except ValueError: + raise ValueError("invalid date format") from None diff --git a/src/gitpod/_utils/_transform.py b/src/gitpod/_utils/_transform.py index b0cc20a7..c19124f0 100644 --- a/src/gitpod/_utils/_transform.py +++ b/src/gitpod/_utils/_transform.py @@ -16,18 +16,20 @@ lru_cache, is_mapping, is_iterable, + is_sequence, ) from .._files import is_base64_file_input +from ._compat import get_origin, is_typeddict from ._typing import ( is_list_type, is_union_type, extract_type_arg, is_iterable_type, is_required_type, + is_sequence_type, is_annotated_type, strip_annotated_type, ) -from .._compat import get_origin, model_dump, is_typeddict _T = TypeVar("_T") @@ -167,6 +169,8 @@ def _transform_recursive( Defaults to the same value as the `annotation` argument. """ + from .._compat import model_dump + if inner_type is None: inner_type = annotation @@ -184,6 +188,8 @@ def _transform_recursive( (is_list_type(stripped_type) and is_list(data)) # Iterable[T] or (is_iterable_type(stripped_type) and is_iterable(data) and not isinstance(data, str)) + # Sequence[T] + or (is_sequence_type(stripped_type) and is_sequence(data) and not isinstance(data, str)) ): # dicts are technically iterable, but it is an iterable on the keys of the dict and is not usually # intended as an iterable, so we don't transform it. @@ -329,6 +335,8 @@ async def _async_transform_recursive( Defaults to the same value as the `annotation` argument. """ + from .._compat import model_dump + if inner_type is None: inner_type = annotation @@ -346,6 +354,8 @@ async def _async_transform_recursive( (is_list_type(stripped_type) and is_list(data)) # Iterable[T] or (is_iterable_type(stripped_type) and is_iterable(data) and not isinstance(data, str)) + # Sequence[T] + or (is_sequence_type(stripped_type) and is_sequence(data) and not isinstance(data, str)) ): # dicts are technically iterable, but it is an iterable on the keys of the dict and is not usually # intended as an iterable, so we don't transform it. diff --git a/src/gitpod/_utils/_typing.py b/src/gitpod/_utils/_typing.py index 1bac9542..193109f3 100644 --- a/src/gitpod/_utils/_typing.py +++ b/src/gitpod/_utils/_typing.py @@ -15,7 +15,7 @@ from ._utils import lru_cache from .._types import InheritsGeneric -from .._compat import is_union as _is_union +from ._compat import is_union as _is_union def is_annotated_type(typ: type) -> bool: @@ -26,6 +26,11 @@ def is_list_type(typ: type) -> bool: return (get_origin(typ) or typ) == list +def is_sequence_type(typ: type) -> bool: + origin = get_origin(typ) or typ + return origin == typing_extensions.Sequence or origin == typing.Sequence or origin == _c_abc.Sequence + + def is_iterable_type(typ: type) -> bool: """If the given type is `typing.Iterable[T]`""" origin = get_origin(typ) or typ diff --git a/src/gitpod/_utils/_utils.py b/src/gitpod/_utils/_utils.py index ea3cf3f2..f0818595 100644 --- a/src/gitpod/_utils/_utils.py +++ b/src/gitpod/_utils/_utils.py @@ -22,7 +22,6 @@ import sniffio from .._types import NotGiven, FileTypes, NotGivenOr, HeadersLike -from .._compat import parse_date as parse_date, parse_datetime as parse_datetime _T = TypeVar("_T") _TupleT = TypeVar("_TupleT", bound=Tuple[object, ...]) diff --git a/src/gitpod/_version.py b/src/gitpod/_version.py index 1bd510f0..7fe2c1c0 100644 --- a/src/gitpod/_version.py +++ b/src/gitpod/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "gitpod" -__version__ = "0.3.0" # x-release-please-version +__version__ = "0.4.0" # x-release-please-version diff --git a/src/gitpod/resources/environments/automations/tasks/tasks.py b/src/gitpod/resources/environments/automations/tasks/tasks.py index b8a1b225..6723fe8a 100644 --- a/src/gitpod/resources/environments/automations/tasks/tasks.py +++ b/src/gitpod/resources/environments/automations/tasks/tasks.py @@ -2,11 +2,9 @@ from __future__ import annotations -from typing import List - import httpx -from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr from ....._utils import maybe_transform, async_maybe_transform from .executions import ( ExecutionsResource, @@ -71,7 +69,7 @@ def with_streaming_response(self) -> TasksResourceWithStreamingResponse: def create( self, *, - depends_on: List[str] | NotGiven = NOT_GIVEN, + depends_on: SequenceNotStr[str] | NotGiven = NOT_GIVEN, environment_id: str | NotGiven = NOT_GIVEN, metadata: TaskMetadata | NotGiven = NOT_GIVEN, spec: TaskSpec | NotGiven = NOT_GIVEN, @@ -203,7 +201,7 @@ def update( self, *, id: str | NotGiven = NOT_GIVEN, - depends_on: List[str] | NotGiven = NOT_GIVEN, + depends_on: SequenceNotStr[str] | NotGiven = NOT_GIVEN, metadata: task_update_params.Metadata | NotGiven = NOT_GIVEN, spec: task_update_params.Spec | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -488,7 +486,7 @@ def with_streaming_response(self) -> AsyncTasksResourceWithStreamingResponse: async def create( self, *, - depends_on: List[str] | NotGiven = NOT_GIVEN, + depends_on: SequenceNotStr[str] | NotGiven = NOT_GIVEN, environment_id: str | NotGiven = NOT_GIVEN, metadata: TaskMetadata | NotGiven = NOT_GIVEN, spec: TaskSpec | NotGiven = NOT_GIVEN, @@ -620,7 +618,7 @@ async def update( self, *, id: str | NotGiven = NOT_GIVEN, - depends_on: List[str] | NotGiven = NOT_GIVEN, + depends_on: SequenceNotStr[str] | NotGiven = NOT_GIVEN, metadata: task_update_params.Metadata | NotGiven = NOT_GIVEN, spec: task_update_params.Spec | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. diff --git a/src/gitpod/resources/identity.py b/src/gitpod/resources/identity.py index 25b859b5..dc4b0c30 100644 --- a/src/gitpod/resources/identity.py +++ b/src/gitpod/resources/identity.py @@ -2,8 +2,6 @@ from __future__ import annotations -from typing import List - import httpx from ..types import ( @@ -12,7 +10,7 @@ identity_exchange_token_params, identity_get_authenticated_identity_params, ) -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -157,7 +155,7 @@ def get_authenticated_identity( def get_id_token( self, *, - audience: List[str] | NotGiven = NOT_GIVEN, + audience: SequenceNotStr[str] | NotGiven = NOT_GIVEN, version: IDTokenVersion | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -349,7 +347,7 @@ async def get_authenticated_identity( async def get_id_token( self, *, - audience: List[str] | NotGiven = NOT_GIVEN, + audience: SequenceNotStr[str] | NotGiven = NOT_GIVEN, version: IDTokenVersion | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. diff --git a/src/gitpod/resources/organizations/policies.py b/src/gitpod/resources/organizations/policies.py index feb894c5..60124dc6 100644 --- a/src/gitpod/resources/organizations/policies.py +++ b/src/gitpod/resources/organizations/policies.py @@ -2,11 +2,11 @@ from __future__ import annotations -from typing import List, Optional +from typing import Optional import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -97,7 +97,7 @@ def update( self, *, organization_id: str, - allowed_editor_ids: List[str] | NotGiven = NOT_GIVEN, + allowed_editor_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, allow_local_runners: Optional[bool] | NotGiven = NOT_GIVEN, default_editor_id: Optional[str] | NotGiven = NOT_GIVEN, default_environment_image: Optional[str] | NotGiven = NOT_GIVEN, @@ -291,7 +291,7 @@ async def update( self, *, organization_id: str, - allowed_editor_ids: List[str] | NotGiven = NOT_GIVEN, + allowed_editor_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, allow_local_runners: Optional[bool] | NotGiven = NOT_GIVEN, default_editor_id: Optional[str] | NotGiven = NOT_GIVEN, default_environment_image: Optional[str] | NotGiven = NOT_GIVEN, diff --git a/src/gitpod/types/environment_list_params.py b/src/gitpod/types/environment_list_params.py index eedde71c..2e3ed79f 100644 --- a/src/gitpod/types/environment_list_params.py +++ b/src/gitpod/types/environment_list_params.py @@ -5,6 +5,7 @@ from typing import List, Optional from typing_extensions import Literal, Annotated, TypedDict +from .._types import SequenceNotStr from .._utils import PropertyInfo from .runner_kind import RunnerKind from .environment_phase import EnvironmentPhase @@ -37,19 +38,19 @@ class Filter(TypedDict, total=False): ] """archival_status filters the response based on environment archive status""" - creator_ids: Annotated[List[str], PropertyInfo(alias="creatorIds")] + creator_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="creatorIds")] """ creator_ids filters the response to only Environments created by specified members """ - project_ids: Annotated[List[str], PropertyInfo(alias="projectIds")] + project_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="projectIds")] """ project_ids filters the response to only Environments associated with the specified projects """ - runner_ids: Annotated[List[str], PropertyInfo(alias="runnerIds")] + runner_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="runnerIds")] """ runner_ids filters the response to only Environments running on these Runner IDs """ diff --git a/src/gitpod/types/environments/automations/service_list_params.py b/src/gitpod/types/environments/automations/service_list_params.py index c2c08b03..76c8981d 100644 --- a/src/gitpod/types/environments/automations/service_list_params.py +++ b/src/gitpod/types/environments/automations/service_list_params.py @@ -2,9 +2,9 @@ from __future__ import annotations -from typing import List from typing_extensions import Annotated, TypedDict +from ...._types import SequenceNotStr from ...._utils import PropertyInfo __all__ = ["ServiceListParams", "Filter", "Pagination"] @@ -23,13 +23,13 @@ class ServiceListParams(TypedDict, total=False): class Filter(TypedDict, total=False): - environment_ids: Annotated[List[str], PropertyInfo(alias="environmentIds")] + environment_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="environmentIds")] """environment_ids filters the response to only services of these environments""" - references: List[str] + references: SequenceNotStr[str] """references filters the response to only services with these references""" - service_ids: Annotated[List[str], PropertyInfo(alias="serviceIds")] + service_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="serviceIds")] """service_ids filters the response to only services with these IDs""" diff --git a/src/gitpod/types/environments/automations/task_create_params.py b/src/gitpod/types/environments/automations/task_create_params.py index 5bb8916f..4258da77 100644 --- a/src/gitpod/types/environments/automations/task_create_params.py +++ b/src/gitpod/types/environments/automations/task_create_params.py @@ -2,9 +2,9 @@ from __future__ import annotations -from typing import List from typing_extensions import Annotated, TypedDict +from ...._types import SequenceNotStr from ...._utils import PropertyInfo from ...shared_params.task_spec import TaskSpec from ...shared_params.task_metadata import TaskMetadata @@ -13,7 +13,7 @@ class TaskCreateParams(TypedDict, total=False): - depends_on: Annotated[List[str], PropertyInfo(alias="dependsOn")] + depends_on: Annotated[SequenceNotStr[str], PropertyInfo(alias="dependsOn")] environment_id: Annotated[str, PropertyInfo(alias="environmentId")] diff --git a/src/gitpod/types/environments/automations/task_list_params.py b/src/gitpod/types/environments/automations/task_list_params.py index 7afc694b..3dc576db 100644 --- a/src/gitpod/types/environments/automations/task_list_params.py +++ b/src/gitpod/types/environments/automations/task_list_params.py @@ -2,9 +2,9 @@ from __future__ import annotations -from typing import List from typing_extensions import Annotated, TypedDict +from ...._types import SequenceNotStr from ...._utils import PropertyInfo __all__ = ["TaskListParams", "Filter", "Pagination"] @@ -23,13 +23,13 @@ class TaskListParams(TypedDict, total=False): class Filter(TypedDict, total=False): - environment_ids: Annotated[List[str], PropertyInfo(alias="environmentIds")] + environment_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="environmentIds")] """environment_ids filters the response to only tasks of these environments""" - references: List[str] + references: SequenceNotStr[str] """references filters the response to only services with these references""" - task_ids: Annotated[List[str], PropertyInfo(alias="taskIds")] + task_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="taskIds")] """task_ids filters the response to only tasks with these IDs""" diff --git a/src/gitpod/types/environments/automations/task_update_params.py b/src/gitpod/types/environments/automations/task_update_params.py index 4b0d59a9..43d66208 100644 --- a/src/gitpod/types/environments/automations/task_update_params.py +++ b/src/gitpod/types/environments/automations/task_update_params.py @@ -2,9 +2,10 @@ from __future__ import annotations -from typing import List, Iterable, Optional +from typing import Iterable, Optional from typing_extensions import Annotated, TypedDict +from ...._types import SequenceNotStr from ...._utils import PropertyInfo from ...shared_params.runs_on import RunsOn from ...shared_params.automation_trigger import AutomationTrigger @@ -15,7 +16,7 @@ class TaskUpdateParams(TypedDict, total=False): id: str - depends_on: Annotated[List[str], PropertyInfo(alias="dependsOn")] + depends_on: Annotated[SequenceNotStr[str], PropertyInfo(alias="dependsOn")] """dependencies specifies the IDs of the automations this task depends on.""" metadata: Metadata diff --git a/src/gitpod/types/environments/automations/tasks/execution_list_params.py b/src/gitpod/types/environments/automations/tasks/execution_list_params.py index 0441fb52..a8f517cc 100644 --- a/src/gitpod/types/environments/automations/tasks/execution_list_params.py +++ b/src/gitpod/types/environments/automations/tasks/execution_list_params.py @@ -5,6 +5,7 @@ from typing import List from typing_extensions import Annotated, TypedDict +from ....._types import SequenceNotStr from ....._utils import PropertyInfo from ....shared.task_execution_phase import TaskExecutionPhase @@ -24,16 +25,16 @@ class ExecutionListParams(TypedDict, total=False): class Filter(TypedDict, total=False): - environment_ids: Annotated[List[str], PropertyInfo(alias="environmentIds")] + environment_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="environmentIds")] """environment_ids filters the response to only task runs of these environments""" phases: List[TaskExecutionPhase] """phases filters the response to only task runs in these phases""" - task_ids: Annotated[List[str], PropertyInfo(alias="taskIds")] + task_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="taskIds")] """task_ids filters the response to only task runs of these tasks""" - task_references: Annotated[List[str], PropertyInfo(alias="taskReferences")] + task_references: Annotated[SequenceNotStr[str], PropertyInfo(alias="taskReferences")] """task_references filters the response to only task runs with this reference""" diff --git a/src/gitpod/types/environments/automations_file_param.py b/src/gitpod/types/environments/automations_file_param.py index e2c0a7e3..977537ce 100644 --- a/src/gitpod/types/environments/automations_file_param.py +++ b/src/gitpod/types/environments/automations_file_param.py @@ -5,6 +5,7 @@ from typing import Dict, List from typing_extensions import Literal, Annotated, TypedDict +from ..._types import SequenceNotStr from ..._utils import PropertyInfo from ..shared_params.runs_on import RunsOn @@ -58,7 +59,7 @@ class Services(TypedDict, total=False): class Tasks(TypedDict, total=False): command: str - depends_on: Annotated[List[str], PropertyInfo(alias="dependsOn")] + depends_on: Annotated[SequenceNotStr[str], PropertyInfo(alias="dependsOn")] description: str diff --git a/src/gitpod/types/environments/class_list_params.py b/src/gitpod/types/environments/class_list_params.py index 1abb82c8..c47afe5c 100644 --- a/src/gitpod/types/environments/class_list_params.py +++ b/src/gitpod/types/environments/class_list_params.py @@ -5,6 +5,7 @@ from typing import List, Optional from typing_extensions import Annotated, TypedDict +from ..._types import SequenceNotStr from ..._utils import PropertyInfo from ..runner_kind import RunnerKind from ..runner_provider import RunnerProvider @@ -38,7 +39,7 @@ class Filter(TypedDict, total=False): not set, all environment classes are returned. """ - runner_ids: Annotated[List[str], PropertyInfo(alias="runnerIds")] + runner_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="runnerIds")] """runner_ids filters the response to only EnvironmentClasses of these Runner IDs""" runner_kinds: Annotated[List[RunnerKind], PropertyInfo(alias="runnerKinds")] diff --git a/src/gitpod/types/event_list_params.py b/src/gitpod/types/event_list_params.py index f444df68..06af4ab5 100644 --- a/src/gitpod/types/event_list_params.py +++ b/src/gitpod/types/event_list_params.py @@ -5,6 +5,7 @@ from typing import List from typing_extensions import Annotated, TypedDict +from .._types import SequenceNotStr from .._utils import PropertyInfo from .resource_type import ResourceType from .shared.principal import Principal @@ -24,11 +25,11 @@ class EventListParams(TypedDict, total=False): class Filter(TypedDict, total=False): - actor_ids: Annotated[List[str], PropertyInfo(alias="actorIds")] + actor_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="actorIds")] actor_principals: Annotated[List[Principal], PropertyInfo(alias="actorPrincipals")] - subject_ids: Annotated[List[str], PropertyInfo(alias="subjectIds")] + subject_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="subjectIds")] subject_types: Annotated[List[ResourceType], PropertyInfo(alias="subjectTypes")] diff --git a/src/gitpod/types/identity_get_id_token_params.py b/src/gitpod/types/identity_get_id_token_params.py index c5686ae4..289aadaa 100644 --- a/src/gitpod/types/identity_get_id_token_params.py +++ b/src/gitpod/types/identity_get_id_token_params.py @@ -2,16 +2,16 @@ from __future__ import annotations -from typing import List from typing_extensions import TypedDict +from .._types import SequenceNotStr from .id_token_version import IDTokenVersion __all__ = ["IdentityGetIDTokenParams"] class IdentityGetIDTokenParams(TypedDict, total=False): - audience: List[str] + audience: SequenceNotStr[str] version: IDTokenVersion """version is the version of the ID token.""" diff --git a/src/gitpod/types/invite_domains_param.py b/src/gitpod/types/invite_domains_param.py index d38601a1..e46b1254 100644 --- a/src/gitpod/types/invite_domains_param.py +++ b/src/gitpod/types/invite_domains_param.py @@ -2,12 +2,13 @@ from __future__ import annotations -from typing import List from typing_extensions import TypedDict +from .._types import SequenceNotStr + __all__ = ["InviteDomainsParam"] class InviteDomainsParam(TypedDict, total=False): - domains: List[str] + domains: SequenceNotStr[str] """domains is the list of domains that are allowed to join the organization""" diff --git a/src/gitpod/types/organizations/policy_update_params.py b/src/gitpod/types/organizations/policy_update_params.py index ca6b8ab7..acd315bd 100644 --- a/src/gitpod/types/organizations/policy_update_params.py +++ b/src/gitpod/types/organizations/policy_update_params.py @@ -2,9 +2,10 @@ from __future__ import annotations -from typing import List, Optional +from typing import Optional from typing_extensions import Required, Annotated, TypedDict +from ..._types import SequenceNotStr from ..._utils import PropertyInfo __all__ = ["PolicyUpdateParams"] @@ -14,7 +15,7 @@ class PolicyUpdateParams(TypedDict, total=False): organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] """organization_id is the ID of the organization to update policies for""" - allowed_editor_ids: Annotated[List[str], PropertyInfo(alias="allowedEditorIds")] + allowed_editor_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="allowedEditorIds")] """ allowed_editor_ids is the list of editor IDs that are allowed to be used in the organization diff --git a/src/gitpod/types/project_list_params.py b/src/gitpod/types/project_list_params.py index 4709a7ba..558a8338 100644 --- a/src/gitpod/types/project_list_params.py +++ b/src/gitpod/types/project_list_params.py @@ -2,9 +2,9 @@ from __future__ import annotations -from typing import List from typing_extensions import Annotated, TypedDict +from .._types import SequenceNotStr from .._utils import PropertyInfo __all__ = ["ProjectListParams", "Filter", "Pagination"] @@ -22,7 +22,7 @@ class ProjectListParams(TypedDict, total=False): class Filter(TypedDict, total=False): - project_ids: Annotated[List[str], PropertyInfo(alias="projectIds")] + project_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="projectIds")] """project_ids filters the response to only projects with these IDs""" diff --git a/src/gitpod/types/runner_list_params.py b/src/gitpod/types/runner_list_params.py index 7d2a9864..d013e9d5 100644 --- a/src/gitpod/types/runner_list_params.py +++ b/src/gitpod/types/runner_list_params.py @@ -5,6 +5,7 @@ from typing import List from typing_extensions import Annotated, TypedDict +from .._types import SequenceNotStr from .._utils import PropertyInfo from .runner_kind import RunnerKind from .runner_provider import RunnerProvider @@ -24,7 +25,7 @@ class RunnerListParams(TypedDict, total=False): class Filter(TypedDict, total=False): - creator_ids: Annotated[List[str], PropertyInfo(alias="creatorIds")] + creator_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="creatorIds")] """creator_ids filters the response to only runner created by specified users""" kinds: List[RunnerKind] diff --git a/src/gitpod/types/runners/configurations/environment_class_list_params.py b/src/gitpod/types/runners/configurations/environment_class_list_params.py index 14cdf32d..f8f0b97c 100644 --- a/src/gitpod/types/runners/configurations/environment_class_list_params.py +++ b/src/gitpod/types/runners/configurations/environment_class_list_params.py @@ -5,6 +5,7 @@ from typing import List, Optional from typing_extensions import Annotated, TypedDict +from ...._types import SequenceNotStr from ...._utils import PropertyInfo from ...runner_kind import RunnerKind from ...runner_provider import RunnerProvider @@ -38,7 +39,7 @@ class Filter(TypedDict, total=False): not set, all environment classes are returned. """ - runner_ids: Annotated[List[str], PropertyInfo(alias="runnerIds")] + runner_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="runnerIds")] """runner_ids filters the response to only EnvironmentClasses of these Runner IDs""" runner_kinds: Annotated[List[RunnerKind], PropertyInfo(alias="runnerKinds")] diff --git a/src/gitpod/types/runners/configurations/scm_integration_list_params.py b/src/gitpod/types/runners/configurations/scm_integration_list_params.py index 649b18ad..811ec9cd 100644 --- a/src/gitpod/types/runners/configurations/scm_integration_list_params.py +++ b/src/gitpod/types/runners/configurations/scm_integration_list_params.py @@ -2,9 +2,9 @@ from __future__ import annotations -from typing import List from typing_extensions import Annotated, TypedDict +from ...._types import SequenceNotStr from ...._utils import PropertyInfo __all__ = ["ScmIntegrationListParams", "Filter", "Pagination"] @@ -22,7 +22,7 @@ class ScmIntegrationListParams(TypedDict, total=False): class Filter(TypedDict, total=False): - runner_ids: Annotated[List[str], PropertyInfo(alias="runnerIds")] + runner_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="runnerIds")] """runner_ids filters the response to only SCM integrations of these Runner IDs""" diff --git a/src/gitpod/types/secret_list_params.py b/src/gitpod/types/secret_list_params.py index 44ab4bd5..0ecd8336 100644 --- a/src/gitpod/types/secret_list_params.py +++ b/src/gitpod/types/secret_list_params.py @@ -2,9 +2,9 @@ from __future__ import annotations -from typing import List from typing_extensions import Annotated, TypedDict +from .._types import SequenceNotStr from .._utils import PropertyInfo from .secret_scope_param import SecretScopeParam @@ -23,7 +23,7 @@ class SecretListParams(TypedDict, total=False): class Filter(TypedDict, total=False): - project_ids: Annotated[List[str], PropertyInfo(alias="projectIds")] + project_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="projectIds")] """ project_ids filters the response to only Secrets used by these Project IDs Deprecated: use scope instead. Values in project_ids will be ignored. diff --git a/src/gitpod/types/shared_params/runs_on.py b/src/gitpod/types/shared_params/runs_on.py index 55a079f3..733d8286 100644 --- a/src/gitpod/types/shared_params/runs_on.py +++ b/src/gitpod/types/shared_params/runs_on.py @@ -2,14 +2,15 @@ from __future__ import annotations -from typing import List from typing_extensions import Required, TypedDict +from ..._types import SequenceNotStr + __all__ = ["RunsOn", "Docker"] class Docker(TypedDict, total=False): - environment: List[str] + environment: SequenceNotStr[str] image: str diff --git a/src/gitpod/types/users/pat_list_params.py b/src/gitpod/types/users/pat_list_params.py index b03f6d62..59e62161 100644 --- a/src/gitpod/types/users/pat_list_params.py +++ b/src/gitpod/types/users/pat_list_params.py @@ -2,9 +2,9 @@ from __future__ import annotations -from typing import List from typing_extensions import Annotated, TypedDict +from ..._types import SequenceNotStr from ..._utils import PropertyInfo __all__ = ["PatListParams", "Filter", "Pagination"] @@ -21,7 +21,7 @@ class PatListParams(TypedDict, total=False): class Filter(TypedDict, total=False): - user_ids: Annotated[List[str], PropertyInfo(alias="userIds")] + user_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="userIds")] """ creator_ids filters the response to only Environments created by specified members diff --git a/tests/api_resources/environments/automations/tasks/test_executions.py b/tests/api_resources/environments/automations/tasks/test_executions.py index 1adffcca..f4d55beb 100644 --- a/tests/api_resources/environments/automations/tasks/test_executions.py +++ b/tests/api_resources/environments/automations/tasks/test_executions.py @@ -21,13 +21,13 @@ class TestExecutions: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: Gitpod) -> None: execution = client.environments.automations.tasks.executions.retrieve() assert_matches_type(ExecutionRetrieveResponse, execution, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: execution = client.environments.automations.tasks.executions.retrieve( @@ -35,7 +35,7 @@ def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(ExecutionRetrieveResponse, execution, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.environments.automations.tasks.executions.with_raw_response.retrieve() @@ -45,7 +45,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: execution = response.parse() assert_matches_type(ExecutionRetrieveResponse, execution, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.environments.automations.tasks.executions.with_streaming_response.retrieve() as response: @@ -57,13 +57,13 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: execution = client.environments.automations.tasks.executions.list() assert_matches_type(SyncTaskExecutionsPage[TaskExecution], execution, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: execution = client.environments.automations.tasks.executions.list( @@ -82,7 +82,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncTaskExecutionsPage[TaskExecution], execution, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.environments.automations.tasks.executions.with_raw_response.list() @@ -92,7 +92,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: execution = response.parse() assert_matches_type(SyncTaskExecutionsPage[TaskExecution], execution, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.environments.automations.tasks.executions.with_streaming_response.list() as response: @@ -104,13 +104,13 @@ def test_streaming_response_list(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_stop(self, client: Gitpod) -> None: execution = client.environments.automations.tasks.executions.stop() assert_matches_type(object, execution, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_stop_with_all_params(self, client: Gitpod) -> None: execution = client.environments.automations.tasks.executions.stop( @@ -118,7 +118,7 @@ def test_method_stop_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, execution, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_stop(self, client: Gitpod) -> None: response = client.environments.automations.tasks.executions.with_raw_response.stop() @@ -128,7 +128,7 @@ def test_raw_response_stop(self, client: Gitpod) -> None: execution = response.parse() assert_matches_type(object, execution, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_stop(self, client: Gitpod) -> None: with client.environments.automations.tasks.executions.with_streaming_response.stop() as response: @@ -142,15 +142,17 @@ def test_streaming_response_stop(self, client: Gitpod) -> None: class TestAsyncExecutions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: execution = await async_client.environments.automations.tasks.executions.retrieve() assert_matches_type(ExecutionRetrieveResponse, execution, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None: execution = await async_client.environments.automations.tasks.executions.retrieve( @@ -158,7 +160,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) ) assert_matches_type(ExecutionRetrieveResponse, execution, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.automations.tasks.executions.with_raw_response.retrieve() @@ -168,7 +170,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: execution = await response.parse() assert_matches_type(ExecutionRetrieveResponse, execution, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with ( @@ -182,13 +184,13 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: execution = await async_client.environments.automations.tasks.executions.list() assert_matches_type(AsyncTaskExecutionsPage[TaskExecution], execution, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: execution = await async_client.environments.automations.tasks.executions.list( @@ -207,7 +209,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(AsyncTaskExecutionsPage[TaskExecution], execution, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.automations.tasks.executions.with_raw_response.list() @@ -217,7 +219,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: execution = await response.parse() assert_matches_type(AsyncTaskExecutionsPage[TaskExecution], execution, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.environments.automations.tasks.executions.with_streaming_response.list() as response: @@ -229,13 +231,13 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_stop(self, async_client: AsyncGitpod) -> None: execution = await async_client.environments.automations.tasks.executions.stop() assert_matches_type(object, execution, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_stop_with_all_params(self, async_client: AsyncGitpod) -> None: execution = await async_client.environments.automations.tasks.executions.stop( @@ -243,7 +245,7 @@ async def test_method_stop_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(object, execution, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_stop(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.automations.tasks.executions.with_raw_response.stop() @@ -253,7 +255,7 @@ async def test_raw_response_stop(self, async_client: AsyncGitpod) -> None: execution = await response.parse() assert_matches_type(object, execution, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_stop(self, async_client: AsyncGitpod) -> None: async with async_client.environments.automations.tasks.executions.with_streaming_response.stop() as response: diff --git a/tests/api_resources/environments/automations/test_services.py b/tests/api_resources/environments/automations/test_services.py index c64d5770..d4b9aebc 100644 --- a/tests/api_resources/environments/automations/test_services.py +++ b/tests/api_resources/environments/automations/test_services.py @@ -23,13 +23,13 @@ class TestServices: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: Gitpod) -> None: service = client.environments.automations.services.create() assert_matches_type(ServiceCreateResponse, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: Gitpod) -> None: service = client.environments.automations.services.create( @@ -70,7 +70,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(ServiceCreateResponse, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: Gitpod) -> None: response = client.environments.automations.services.with_raw_response.create() @@ -80,7 +80,7 @@ def test_raw_response_create(self, client: Gitpod) -> None: service = response.parse() assert_matches_type(ServiceCreateResponse, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: with client.environments.automations.services.with_streaming_response.create() as response: @@ -92,13 +92,13 @@ def test_streaming_response_create(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: Gitpod) -> None: service = client.environments.automations.services.retrieve() assert_matches_type(ServiceRetrieveResponse, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: service = client.environments.automations.services.retrieve( @@ -106,7 +106,7 @@ def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(ServiceRetrieveResponse, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.environments.automations.services.with_raw_response.retrieve() @@ -116,7 +116,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: service = response.parse() assert_matches_type(ServiceRetrieveResponse, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.environments.automations.services.with_streaming_response.retrieve() as response: @@ -128,13 +128,13 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: Gitpod) -> None: service = client.environments.automations.services.update() assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: Gitpod) -> None: service = client.environments.automations.services.update( @@ -175,7 +175,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: Gitpod) -> None: response = client.environments.automations.services.with_raw_response.update() @@ -185,7 +185,7 @@ def test_raw_response_update(self, client: Gitpod) -> None: service = response.parse() assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: Gitpod) -> None: with client.environments.automations.services.with_streaming_response.update() as response: @@ -197,13 +197,13 @@ def test_streaming_response_update(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: service = client.environments.automations.services.list() assert_matches_type(SyncServicesPage[Service], service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: service = client.environments.automations.services.list( @@ -221,7 +221,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncServicesPage[Service], service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.environments.automations.services.with_raw_response.list() @@ -231,7 +231,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: service = response.parse() assert_matches_type(SyncServicesPage[Service], service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.environments.automations.services.with_streaming_response.list() as response: @@ -243,13 +243,13 @@ def test_streaming_response_list(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: Gitpod) -> None: service = client.environments.automations.services.delete() assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete_with_all_params(self, client: Gitpod) -> None: service = client.environments.automations.services.delete( @@ -258,7 +258,7 @@ def test_method_delete_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: response = client.environments.automations.services.with_raw_response.delete() @@ -268,7 +268,7 @@ def test_raw_response_delete(self, client: Gitpod) -> None: service = response.parse() assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: with client.environments.automations.services.with_streaming_response.delete() as response: @@ -280,13 +280,13 @@ def test_streaming_response_delete(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_start(self, client: Gitpod) -> None: service = client.environments.automations.services.start() assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_start_with_all_params(self, client: Gitpod) -> None: service = client.environments.automations.services.start( @@ -294,7 +294,7 @@ def test_method_start_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_start(self, client: Gitpod) -> None: response = client.environments.automations.services.with_raw_response.start() @@ -304,7 +304,7 @@ def test_raw_response_start(self, client: Gitpod) -> None: service = response.parse() assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_start(self, client: Gitpod) -> None: with client.environments.automations.services.with_streaming_response.start() as response: @@ -316,13 +316,13 @@ def test_streaming_response_start(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_stop(self, client: Gitpod) -> None: service = client.environments.automations.services.stop() assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_stop_with_all_params(self, client: Gitpod) -> None: service = client.environments.automations.services.stop( @@ -330,7 +330,7 @@ def test_method_stop_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_stop(self, client: Gitpod) -> None: response = client.environments.automations.services.with_raw_response.stop() @@ -340,7 +340,7 @@ def test_raw_response_stop(self, client: Gitpod) -> None: service = response.parse() assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_stop(self, client: Gitpod) -> None: with client.environments.automations.services.with_streaming_response.stop() as response: @@ -354,15 +354,17 @@ def test_streaming_response_stop(self, client: Gitpod) -> None: class TestAsyncServices: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: service = await async_client.environments.automations.services.create() assert_matches_type(ServiceCreateResponse, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: service = await async_client.environments.automations.services.create( @@ -403,7 +405,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(ServiceCreateResponse, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.automations.services.with_raw_response.create() @@ -413,7 +415,7 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: service = await response.parse() assert_matches_type(ServiceCreateResponse, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: async with async_client.environments.automations.services.with_streaming_response.create() as response: @@ -425,13 +427,13 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: service = await async_client.environments.automations.services.retrieve() assert_matches_type(ServiceRetrieveResponse, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None: service = await async_client.environments.automations.services.retrieve( @@ -439,7 +441,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) ) assert_matches_type(ServiceRetrieveResponse, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.automations.services.with_raw_response.retrieve() @@ -449,7 +451,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: service = await response.parse() assert_matches_type(ServiceRetrieveResponse, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with async_client.environments.automations.services.with_streaming_response.retrieve() as response: @@ -461,13 +463,13 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncGitpod) -> None: service = await async_client.environments.automations.services.update() assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None: service = await async_client.environments.automations.services.update( @@ -508,7 +510,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.automations.services.with_raw_response.update() @@ -518,7 +520,7 @@ async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: service = await response.parse() assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncGitpod) -> None: async with async_client.environments.automations.services.with_streaming_response.update() as response: @@ -530,13 +532,13 @@ async def test_streaming_response_update(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: service = await async_client.environments.automations.services.list() assert_matches_type(AsyncServicesPage[Service], service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: service = await async_client.environments.automations.services.list( @@ -554,7 +556,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(AsyncServicesPage[Service], service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.automations.services.with_raw_response.list() @@ -564,7 +566,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: service = await response.parse() assert_matches_type(AsyncServicesPage[Service], service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.environments.automations.services.with_streaming_response.list() as response: @@ -576,13 +578,13 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: service = await async_client.environments.automations.services.delete() assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> None: service = await async_client.environments.automations.services.delete( @@ -591,7 +593,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.automations.services.with_raw_response.delete() @@ -601,7 +603,7 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: service = await response.parse() assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: async with async_client.environments.automations.services.with_streaming_response.delete() as response: @@ -613,13 +615,13 @@ async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_start(self, async_client: AsyncGitpod) -> None: service = await async_client.environments.automations.services.start() assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_start_with_all_params(self, async_client: AsyncGitpod) -> None: service = await async_client.environments.automations.services.start( @@ -627,7 +629,7 @@ async def test_method_start_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_start(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.automations.services.with_raw_response.start() @@ -637,7 +639,7 @@ async def test_raw_response_start(self, async_client: AsyncGitpod) -> None: service = await response.parse() assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_start(self, async_client: AsyncGitpod) -> None: async with async_client.environments.automations.services.with_streaming_response.start() as response: @@ -649,13 +651,13 @@ async def test_streaming_response_start(self, async_client: AsyncGitpod) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_stop(self, async_client: AsyncGitpod) -> None: service = await async_client.environments.automations.services.stop() assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_stop_with_all_params(self, async_client: AsyncGitpod) -> None: service = await async_client.environments.automations.services.stop( @@ -663,7 +665,7 @@ async def test_method_stop_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_stop(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.automations.services.with_raw_response.stop() @@ -673,7 +675,7 @@ async def test_raw_response_stop(self, async_client: AsyncGitpod) -> None: service = await response.parse() assert_matches_type(object, service, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_stop(self, async_client: AsyncGitpod) -> None: async with async_client.environments.automations.services.with_streaming_response.stop() as response: diff --git a/tests/api_resources/environments/automations/test_tasks.py b/tests/api_resources/environments/automations/test_tasks.py index d9b63d44..58ec8c1d 100644 --- a/tests/api_resources/environments/automations/test_tasks.py +++ b/tests/api_resources/environments/automations/test_tasks.py @@ -24,13 +24,13 @@ class TestTasks: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: Gitpod) -> None: task = client.environments.automations.tasks.create() assert_matches_type(TaskCreateResponse, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: Gitpod) -> None: task = client.environments.automations.tasks.create( @@ -65,7 +65,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(TaskCreateResponse, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: Gitpod) -> None: response = client.environments.automations.tasks.with_raw_response.create() @@ -75,7 +75,7 @@ def test_raw_response_create(self, client: Gitpod) -> None: task = response.parse() assert_matches_type(TaskCreateResponse, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: with client.environments.automations.tasks.with_streaming_response.create() as response: @@ -87,13 +87,13 @@ def test_streaming_response_create(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: Gitpod) -> None: task = client.environments.automations.tasks.retrieve() assert_matches_type(TaskRetrieveResponse, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: task = client.environments.automations.tasks.retrieve( @@ -101,7 +101,7 @@ def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(TaskRetrieveResponse, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.environments.automations.tasks.with_raw_response.retrieve() @@ -111,7 +111,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: task = response.parse() assert_matches_type(TaskRetrieveResponse, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.environments.automations.tasks.with_streaming_response.retrieve() as response: @@ -123,13 +123,13 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: Gitpod) -> None: task = client.environments.automations.tasks.update() assert_matches_type(object, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: Gitpod) -> None: task = client.environments.automations.tasks.update( @@ -160,7 +160,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: Gitpod) -> None: response = client.environments.automations.tasks.with_raw_response.update() @@ -170,7 +170,7 @@ def test_raw_response_update(self, client: Gitpod) -> None: task = response.parse() assert_matches_type(object, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: Gitpod) -> None: with client.environments.automations.tasks.with_streaming_response.update() as response: @@ -182,13 +182,13 @@ def test_streaming_response_update(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: task = client.environments.automations.tasks.list() assert_matches_type(SyncTasksPage[Task], task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: task = client.environments.automations.tasks.list( @@ -206,7 +206,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncTasksPage[Task], task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.environments.automations.tasks.with_raw_response.list() @@ -216,7 +216,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: task = response.parse() assert_matches_type(SyncTasksPage[Task], task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.environments.automations.tasks.with_streaming_response.list() as response: @@ -228,13 +228,13 @@ def test_streaming_response_list(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: Gitpod) -> None: task = client.environments.automations.tasks.delete() assert_matches_type(object, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete_with_all_params(self, client: Gitpod) -> None: task = client.environments.automations.tasks.delete( @@ -242,7 +242,7 @@ def test_method_delete_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: response = client.environments.automations.tasks.with_raw_response.delete() @@ -252,7 +252,7 @@ def test_raw_response_delete(self, client: Gitpod) -> None: task = response.parse() assert_matches_type(object, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: with client.environments.automations.tasks.with_streaming_response.delete() as response: @@ -264,13 +264,13 @@ def test_streaming_response_delete(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_start(self, client: Gitpod) -> None: task = client.environments.automations.tasks.start() assert_matches_type(TaskStartResponse, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_start_with_all_params(self, client: Gitpod) -> None: task = client.environments.automations.tasks.start( @@ -278,7 +278,7 @@ def test_method_start_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(TaskStartResponse, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_start(self, client: Gitpod) -> None: response = client.environments.automations.tasks.with_raw_response.start() @@ -288,7 +288,7 @@ def test_raw_response_start(self, client: Gitpod) -> None: task = response.parse() assert_matches_type(TaskStartResponse, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_start(self, client: Gitpod) -> None: with client.environments.automations.tasks.with_streaming_response.start() as response: @@ -302,15 +302,17 @@ def test_streaming_response_start(self, client: Gitpod) -> None: class TestAsyncTasks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: task = await async_client.environments.automations.tasks.create() assert_matches_type(TaskCreateResponse, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: task = await async_client.environments.automations.tasks.create( @@ -345,7 +347,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(TaskCreateResponse, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.automations.tasks.with_raw_response.create() @@ -355,7 +357,7 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: task = await response.parse() assert_matches_type(TaskCreateResponse, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: async with async_client.environments.automations.tasks.with_streaming_response.create() as response: @@ -367,13 +369,13 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: task = await async_client.environments.automations.tasks.retrieve() assert_matches_type(TaskRetrieveResponse, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None: task = await async_client.environments.automations.tasks.retrieve( @@ -381,7 +383,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) ) assert_matches_type(TaskRetrieveResponse, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.automations.tasks.with_raw_response.retrieve() @@ -391,7 +393,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: task = await response.parse() assert_matches_type(TaskRetrieveResponse, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with async_client.environments.automations.tasks.with_streaming_response.retrieve() as response: @@ -403,13 +405,13 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncGitpod) -> None: task = await async_client.environments.automations.tasks.update() assert_matches_type(object, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None: task = await async_client.environments.automations.tasks.update( @@ -440,7 +442,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.automations.tasks.with_raw_response.update() @@ -450,7 +452,7 @@ async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: task = await response.parse() assert_matches_type(object, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncGitpod) -> None: async with async_client.environments.automations.tasks.with_streaming_response.update() as response: @@ -462,13 +464,13 @@ async def test_streaming_response_update(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: task = await async_client.environments.automations.tasks.list() assert_matches_type(AsyncTasksPage[Task], task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: task = await async_client.environments.automations.tasks.list( @@ -486,7 +488,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(AsyncTasksPage[Task], task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.automations.tasks.with_raw_response.list() @@ -496,7 +498,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: task = await response.parse() assert_matches_type(AsyncTasksPage[Task], task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.environments.automations.tasks.with_streaming_response.list() as response: @@ -508,13 +510,13 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: task = await async_client.environments.automations.tasks.delete() assert_matches_type(object, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> None: task = await async_client.environments.automations.tasks.delete( @@ -522,7 +524,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.automations.tasks.with_raw_response.delete() @@ -532,7 +534,7 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: task = await response.parse() assert_matches_type(object, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: async with async_client.environments.automations.tasks.with_streaming_response.delete() as response: @@ -544,13 +546,13 @@ async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_start(self, async_client: AsyncGitpod) -> None: task = await async_client.environments.automations.tasks.start() assert_matches_type(TaskStartResponse, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_start_with_all_params(self, async_client: AsyncGitpod) -> None: task = await async_client.environments.automations.tasks.start( @@ -558,7 +560,7 @@ async def test_method_start_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(TaskStartResponse, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_start(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.automations.tasks.with_raw_response.start() @@ -568,7 +570,7 @@ async def test_raw_response_start(self, async_client: AsyncGitpod) -> None: task = await response.parse() assert_matches_type(TaskStartResponse, task, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_start(self, async_client: AsyncGitpod) -> None: async with async_client.environments.automations.tasks.with_streaming_response.start() as response: diff --git a/tests/api_resources/environments/test_automations.py b/tests/api_resources/environments/test_automations.py index 5d9cff16..8a2f0551 100644 --- a/tests/api_resources/environments/test_automations.py +++ b/tests/api_resources/environments/test_automations.py @@ -17,13 +17,13 @@ class TestAutomations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_upsert(self, client: Gitpod) -> None: automation = client.environments.automations.upsert() assert_matches_type(AutomationUpsertResponse, automation, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_upsert_with_all_params(self, client: Gitpod) -> None: automation = client.environments.automations.upsert( @@ -66,7 +66,7 @@ def test_method_upsert_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(AutomationUpsertResponse, automation, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_upsert(self, client: Gitpod) -> None: response = client.environments.automations.with_raw_response.upsert() @@ -76,7 +76,7 @@ def test_raw_response_upsert(self, client: Gitpod) -> None: automation = response.parse() assert_matches_type(AutomationUpsertResponse, automation, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_upsert(self, client: Gitpod) -> None: with client.environments.automations.with_streaming_response.upsert() as response: @@ -90,15 +90,17 @@ def test_streaming_response_upsert(self, client: Gitpod) -> None: class TestAsyncAutomations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_upsert(self, async_client: AsyncGitpod) -> None: automation = await async_client.environments.automations.upsert() assert_matches_type(AutomationUpsertResponse, automation, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_upsert_with_all_params(self, async_client: AsyncGitpod) -> None: automation = await async_client.environments.automations.upsert( @@ -141,7 +143,7 @@ async def test_method_upsert_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(AutomationUpsertResponse, automation, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_upsert(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.automations.with_raw_response.upsert() @@ -151,7 +153,7 @@ async def test_raw_response_upsert(self, async_client: AsyncGitpod) -> None: automation = await response.parse() assert_matches_type(AutomationUpsertResponse, automation, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_upsert(self, async_client: AsyncGitpod) -> None: async with async_client.environments.automations.with_streaming_response.upsert() as response: diff --git a/tests/api_resources/environments/test_classes.py b/tests/api_resources/environments/test_classes.py index ba3893e4..9f70511b 100644 --- a/tests/api_resources/environments/test_classes.py +++ b/tests/api_resources/environments/test_classes.py @@ -18,13 +18,13 @@ class TestClasses: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: class_ = client.environments.classes.list() assert_matches_type(SyncEnvironmentClassesPage[EnvironmentClass], class_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: class_ = client.environments.classes.list( @@ -44,7 +44,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncEnvironmentClassesPage[EnvironmentClass], class_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.environments.classes.with_raw_response.list() @@ -54,7 +54,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: class_ = response.parse() assert_matches_type(SyncEnvironmentClassesPage[EnvironmentClass], class_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.environments.classes.with_streaming_response.list() as response: @@ -68,15 +68,17 @@ def test_streaming_response_list(self, client: Gitpod) -> None: class TestAsyncClasses: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: class_ = await async_client.environments.classes.list() assert_matches_type(AsyncEnvironmentClassesPage[EnvironmentClass], class_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: class_ = await async_client.environments.classes.list( @@ -96,7 +98,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(AsyncEnvironmentClassesPage[EnvironmentClass], class_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.classes.with_raw_response.list() @@ -106,7 +108,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: class_ = await response.parse() assert_matches_type(AsyncEnvironmentClassesPage[EnvironmentClass], class_, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.environments.classes.with_streaming_response.list() as response: diff --git a/tests/api_resources/organizations/test_domain_verifications.py b/tests/api_resources/organizations/test_domain_verifications.py index 3c2a0c00..c6c7043e 100644 --- a/tests/api_resources/organizations/test_domain_verifications.py +++ b/tests/api_resources/organizations/test_domain_verifications.py @@ -23,7 +23,7 @@ class TestDomainVerifications: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: Gitpod) -> None: domain_verification = client.organizations.domain_verifications.create( @@ -32,7 +32,7 @@ def test_method_create(self, client: Gitpod) -> None: ) assert_matches_type(DomainVerificationCreateResponse, domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: Gitpod) -> None: response = client.organizations.domain_verifications.with_raw_response.create( @@ -45,7 +45,7 @@ def test_raw_response_create(self, client: Gitpod) -> None: domain_verification = response.parse() assert_matches_type(DomainVerificationCreateResponse, domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: with client.organizations.domain_verifications.with_streaming_response.create( @@ -60,7 +60,7 @@ def test_streaming_response_create(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: Gitpod) -> None: domain_verification = client.organizations.domain_verifications.retrieve( @@ -68,7 +68,7 @@ def test_method_retrieve(self, client: Gitpod) -> None: ) assert_matches_type(DomainVerificationRetrieveResponse, domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.organizations.domain_verifications.with_raw_response.retrieve( @@ -80,7 +80,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: domain_verification = response.parse() assert_matches_type(DomainVerificationRetrieveResponse, domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.organizations.domain_verifications.with_streaming_response.retrieve( @@ -94,7 +94,7 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: domain_verification = client.organizations.domain_verifications.list( @@ -102,7 +102,7 @@ def test_method_list(self, client: Gitpod) -> None: ) assert_matches_type(SyncDomainVerificationsPage[DomainVerification], domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: domain_verification = client.organizations.domain_verifications.list( @@ -116,7 +116,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncDomainVerificationsPage[DomainVerification], domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.organizations.domain_verifications.with_raw_response.list( @@ -128,7 +128,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: domain_verification = response.parse() assert_matches_type(SyncDomainVerificationsPage[DomainVerification], domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.organizations.domain_verifications.with_streaming_response.list( @@ -142,7 +142,7 @@ def test_streaming_response_list(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: Gitpod) -> None: domain_verification = client.organizations.domain_verifications.delete( @@ -150,7 +150,7 @@ def test_method_delete(self, client: Gitpod) -> None: ) assert_matches_type(object, domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: response = client.organizations.domain_verifications.with_raw_response.delete( @@ -162,7 +162,7 @@ def test_raw_response_delete(self, client: Gitpod) -> None: domain_verification = response.parse() assert_matches_type(object, domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: with client.organizations.domain_verifications.with_streaming_response.delete( @@ -176,7 +176,7 @@ def test_streaming_response_delete(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_verify(self, client: Gitpod) -> None: domain_verification = client.organizations.domain_verifications.verify( @@ -184,7 +184,7 @@ def test_method_verify(self, client: Gitpod) -> None: ) assert_matches_type(DomainVerificationVerifyResponse, domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_verify(self, client: Gitpod) -> None: response = client.organizations.domain_verifications.with_raw_response.verify( @@ -196,7 +196,7 @@ def test_raw_response_verify(self, client: Gitpod) -> None: domain_verification = response.parse() assert_matches_type(DomainVerificationVerifyResponse, domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_verify(self, client: Gitpod) -> None: with client.organizations.domain_verifications.with_streaming_response.verify( @@ -212,9 +212,11 @@ def test_streaming_response_verify(self, client: Gitpod) -> None: class TestAsyncDomainVerifications: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: domain_verification = await async_client.organizations.domain_verifications.create( @@ -223,7 +225,7 @@ async def test_method_create(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(DomainVerificationCreateResponse, domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.domain_verifications.with_raw_response.create( @@ -236,7 +238,7 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: domain_verification = await response.parse() assert_matches_type(DomainVerificationCreateResponse, domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.domain_verifications.with_streaming_response.create( @@ -251,7 +253,7 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: domain_verification = await async_client.organizations.domain_verifications.retrieve( @@ -259,7 +261,7 @@ async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(DomainVerificationRetrieveResponse, domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.domain_verifications.with_raw_response.retrieve( @@ -271,7 +273,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: domain_verification = await response.parse() assert_matches_type(DomainVerificationRetrieveResponse, domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.domain_verifications.with_streaming_response.retrieve( @@ -285,7 +287,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: domain_verification = await async_client.organizations.domain_verifications.list( @@ -293,7 +295,7 @@ async def test_method_list(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(AsyncDomainVerificationsPage[DomainVerification], domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: domain_verification = await async_client.organizations.domain_verifications.list( @@ -307,7 +309,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(AsyncDomainVerificationsPage[DomainVerification], domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.domain_verifications.with_raw_response.list( @@ -319,7 +321,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: domain_verification = await response.parse() assert_matches_type(AsyncDomainVerificationsPage[DomainVerification], domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.domain_verifications.with_streaming_response.list( @@ -335,7 +337,7 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: domain_verification = await async_client.organizations.domain_verifications.delete( @@ -343,7 +345,7 @@ async def test_method_delete(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(object, domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.domain_verifications.with_raw_response.delete( @@ -355,7 +357,7 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: domain_verification = await response.parse() assert_matches_type(object, domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.domain_verifications.with_streaming_response.delete( @@ -369,7 +371,7 @@ async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_verify(self, async_client: AsyncGitpod) -> None: domain_verification = await async_client.organizations.domain_verifications.verify( @@ -377,7 +379,7 @@ async def test_method_verify(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(DomainVerificationVerifyResponse, domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_verify(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.domain_verifications.with_raw_response.verify( @@ -389,7 +391,7 @@ async def test_raw_response_verify(self, async_client: AsyncGitpod) -> None: domain_verification = await response.parse() assert_matches_type(DomainVerificationVerifyResponse, domain_verification, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_verify(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.domain_verifications.with_streaming_response.verify( diff --git a/tests/api_resources/organizations/test_invites.py b/tests/api_resources/organizations/test_invites.py index 524b61cf..df2e8805 100644 --- a/tests/api_resources/organizations/test_invites.py +++ b/tests/api_resources/organizations/test_invites.py @@ -21,7 +21,7 @@ class TestInvites: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: Gitpod) -> None: invite = client.organizations.invites.create( @@ -29,7 +29,7 @@ def test_method_create(self, client: Gitpod) -> None: ) assert_matches_type(InviteCreateResponse, invite, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: Gitpod) -> None: response = client.organizations.invites.with_raw_response.create( @@ -41,7 +41,7 @@ def test_raw_response_create(self, client: Gitpod) -> None: invite = response.parse() assert_matches_type(InviteCreateResponse, invite, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: with client.organizations.invites.with_streaming_response.create( @@ -55,7 +55,7 @@ def test_streaming_response_create(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: Gitpod) -> None: invite = client.organizations.invites.retrieve( @@ -63,7 +63,7 @@ def test_method_retrieve(self, client: Gitpod) -> None: ) assert_matches_type(InviteRetrieveResponse, invite, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.organizations.invites.with_raw_response.retrieve( @@ -75,7 +75,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: invite = response.parse() assert_matches_type(InviteRetrieveResponse, invite, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.organizations.invites.with_streaming_response.retrieve( @@ -89,7 +89,7 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get_summary(self, client: Gitpod) -> None: invite = client.organizations.invites.get_summary( @@ -97,7 +97,7 @@ def test_method_get_summary(self, client: Gitpod) -> None: ) assert_matches_type(InviteGetSummaryResponse, invite, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_get_summary(self, client: Gitpod) -> None: response = client.organizations.invites.with_raw_response.get_summary( @@ -109,7 +109,7 @@ def test_raw_response_get_summary(self, client: Gitpod) -> None: invite = response.parse() assert_matches_type(InviteGetSummaryResponse, invite, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_get_summary(self, client: Gitpod) -> None: with client.organizations.invites.with_streaming_response.get_summary( @@ -125,9 +125,11 @@ def test_streaming_response_get_summary(self, client: Gitpod) -> None: class TestAsyncInvites: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: invite = await async_client.organizations.invites.create( @@ -135,7 +137,7 @@ async def test_method_create(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(InviteCreateResponse, invite, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.invites.with_raw_response.create( @@ -147,7 +149,7 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: invite = await response.parse() assert_matches_type(InviteCreateResponse, invite, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.invites.with_streaming_response.create( @@ -161,7 +163,7 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: invite = await async_client.organizations.invites.retrieve( @@ -169,7 +171,7 @@ async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(InviteRetrieveResponse, invite, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.invites.with_raw_response.retrieve( @@ -181,7 +183,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: invite = await response.parse() assert_matches_type(InviteRetrieveResponse, invite, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.invites.with_streaming_response.retrieve( @@ -195,7 +197,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get_summary(self, async_client: AsyncGitpod) -> None: invite = await async_client.organizations.invites.get_summary( @@ -203,7 +205,7 @@ async def test_method_get_summary(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(InviteGetSummaryResponse, invite, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_get_summary(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.invites.with_raw_response.get_summary( @@ -215,7 +217,7 @@ async def test_raw_response_get_summary(self, async_client: AsyncGitpod) -> None invite = await response.parse() assert_matches_type(InviteGetSummaryResponse, invite, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_get_summary(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.invites.with_streaming_response.get_summary( diff --git a/tests/api_resources/organizations/test_policies.py b/tests/api_resources/organizations/test_policies.py index 6d7709f8..cf7c13ff 100644 --- a/tests/api_resources/organizations/test_policies.py +++ b/tests/api_resources/organizations/test_policies.py @@ -17,7 +17,7 @@ class TestPolicies: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: Gitpod) -> None: policy = client.organizations.policies.retrieve( @@ -25,7 +25,7 @@ def test_method_retrieve(self, client: Gitpod) -> None: ) assert_matches_type(PolicyRetrieveResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.organizations.policies.with_raw_response.retrieve( @@ -37,7 +37,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: policy = response.parse() assert_matches_type(PolicyRetrieveResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.organizations.policies.with_streaming_response.retrieve( @@ -51,7 +51,7 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: Gitpod) -> None: policy = client.organizations.policies.update( @@ -59,7 +59,7 @@ def test_method_update(self, client: Gitpod) -> None: ) assert_matches_type(object, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: Gitpod) -> None: policy = client.organizations.policies.update( @@ -77,7 +77,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: Gitpod) -> None: response = client.organizations.policies.with_raw_response.update( @@ -89,7 +89,7 @@ def test_raw_response_update(self, client: Gitpod) -> None: policy = response.parse() assert_matches_type(object, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: Gitpod) -> None: with client.organizations.policies.with_streaming_response.update( @@ -105,9 +105,11 @@ def test_streaming_response_update(self, client: Gitpod) -> None: class TestAsyncPolicies: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: policy = await async_client.organizations.policies.retrieve( @@ -115,7 +117,7 @@ async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(PolicyRetrieveResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.policies.with_raw_response.retrieve( @@ -127,7 +129,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: policy = await response.parse() assert_matches_type(PolicyRetrieveResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.policies.with_streaming_response.retrieve( @@ -141,7 +143,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncGitpod) -> None: policy = await async_client.organizations.policies.update( @@ -149,7 +151,7 @@ async def test_method_update(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(object, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None: policy = await async_client.organizations.policies.update( @@ -167,7 +169,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.policies.with_raw_response.update( @@ -179,7 +181,7 @@ async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: policy = await response.parse() assert_matches_type(object, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.policies.with_streaming_response.update( diff --git a/tests/api_resources/organizations/test_sso_configurations.py b/tests/api_resources/organizations/test_sso_configurations.py index 566d79f8..415fd137 100644 --- a/tests/api_resources/organizations/test_sso_configurations.py +++ b/tests/api_resources/organizations/test_sso_configurations.py @@ -22,7 +22,7 @@ class TestSSOConfigurations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: Gitpod) -> None: sso_configuration = client.organizations.sso_configurations.create( @@ -34,7 +34,7 @@ def test_method_create(self, client: Gitpod) -> None: ) assert_matches_type(SSOConfigurationCreateResponse, sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: Gitpod) -> None: response = client.organizations.sso_configurations.with_raw_response.create( @@ -50,7 +50,7 @@ def test_raw_response_create(self, client: Gitpod) -> None: sso_configuration = response.parse() assert_matches_type(SSOConfigurationCreateResponse, sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: with client.organizations.sso_configurations.with_streaming_response.create( @@ -68,7 +68,7 @@ def test_streaming_response_create(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: Gitpod) -> None: sso_configuration = client.organizations.sso_configurations.retrieve( @@ -76,7 +76,7 @@ def test_method_retrieve(self, client: Gitpod) -> None: ) assert_matches_type(SSOConfigurationRetrieveResponse, sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.organizations.sso_configurations.with_raw_response.retrieve( @@ -88,7 +88,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: sso_configuration = response.parse() assert_matches_type(SSOConfigurationRetrieveResponse, sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.organizations.sso_configurations.with_streaming_response.retrieve( @@ -102,7 +102,7 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: Gitpod) -> None: sso_configuration = client.organizations.sso_configurations.update( @@ -110,7 +110,7 @@ def test_method_update(self, client: Gitpod) -> None: ) assert_matches_type(object, sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: Gitpod) -> None: sso_configuration = client.organizations.sso_configurations.update( @@ -124,7 +124,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: Gitpod) -> None: response = client.organizations.sso_configurations.with_raw_response.update( @@ -136,7 +136,7 @@ def test_raw_response_update(self, client: Gitpod) -> None: sso_configuration = response.parse() assert_matches_type(object, sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: Gitpod) -> None: with client.organizations.sso_configurations.with_streaming_response.update( @@ -150,7 +150,7 @@ def test_streaming_response_update(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: sso_configuration = client.organizations.sso_configurations.list( @@ -158,7 +158,7 @@ def test_method_list(self, client: Gitpod) -> None: ) assert_matches_type(SyncSSOConfigurationsPage[SSOConfiguration], sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: sso_configuration = client.organizations.sso_configurations.list( @@ -172,7 +172,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncSSOConfigurationsPage[SSOConfiguration], sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.organizations.sso_configurations.with_raw_response.list( @@ -184,7 +184,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: sso_configuration = response.parse() assert_matches_type(SyncSSOConfigurationsPage[SSOConfiguration], sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.organizations.sso_configurations.with_streaming_response.list( @@ -198,7 +198,7 @@ def test_streaming_response_list(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: Gitpod) -> None: sso_configuration = client.organizations.sso_configurations.delete( @@ -206,7 +206,7 @@ def test_method_delete(self, client: Gitpod) -> None: ) assert_matches_type(object, sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: response = client.organizations.sso_configurations.with_raw_response.delete( @@ -218,7 +218,7 @@ def test_raw_response_delete(self, client: Gitpod) -> None: sso_configuration = response.parse() assert_matches_type(object, sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: with client.organizations.sso_configurations.with_streaming_response.delete( @@ -234,9 +234,11 @@ def test_streaming_response_delete(self, client: Gitpod) -> None: class TestAsyncSSOConfigurations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: sso_configuration = await async_client.organizations.sso_configurations.create( @@ -248,7 +250,7 @@ async def test_method_create(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(SSOConfigurationCreateResponse, sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.sso_configurations.with_raw_response.create( @@ -264,7 +266,7 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: sso_configuration = await response.parse() assert_matches_type(SSOConfigurationCreateResponse, sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.sso_configurations.with_streaming_response.create( @@ -282,7 +284,7 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: sso_configuration = await async_client.organizations.sso_configurations.retrieve( @@ -290,7 +292,7 @@ async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(SSOConfigurationRetrieveResponse, sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.sso_configurations.with_raw_response.retrieve( @@ -302,7 +304,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: sso_configuration = await response.parse() assert_matches_type(SSOConfigurationRetrieveResponse, sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.sso_configurations.with_streaming_response.retrieve( @@ -316,7 +318,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncGitpod) -> None: sso_configuration = await async_client.organizations.sso_configurations.update( @@ -324,7 +326,7 @@ async def test_method_update(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(object, sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None: sso_configuration = await async_client.organizations.sso_configurations.update( @@ -338,7 +340,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.sso_configurations.with_raw_response.update( @@ -350,7 +352,7 @@ async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: sso_configuration = await response.parse() assert_matches_type(object, sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.sso_configurations.with_streaming_response.update( @@ -364,7 +366,7 @@ async def test_streaming_response_update(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: sso_configuration = await async_client.organizations.sso_configurations.list( @@ -372,7 +374,7 @@ async def test_method_list(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(AsyncSSOConfigurationsPage[SSOConfiguration], sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: sso_configuration = await async_client.organizations.sso_configurations.list( @@ -386,7 +388,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(AsyncSSOConfigurationsPage[SSOConfiguration], sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.sso_configurations.with_raw_response.list( @@ -398,7 +400,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: sso_configuration = await response.parse() assert_matches_type(AsyncSSOConfigurationsPage[SSOConfiguration], sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.sso_configurations.with_streaming_response.list( @@ -412,7 +414,7 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: sso_configuration = await async_client.organizations.sso_configurations.delete( @@ -420,7 +422,7 @@ async def test_method_delete(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(object, sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.sso_configurations.with_raw_response.delete( @@ -432,7 +434,7 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: sso_configuration = await response.parse() assert_matches_type(object, sso_configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.sso_configurations.with_streaming_response.delete( diff --git a/tests/api_resources/projects/test_policies.py b/tests/api_resources/projects/test_policies.py index ff81a486..17b49580 100644 --- a/tests/api_resources/projects/test_policies.py +++ b/tests/api_resources/projects/test_policies.py @@ -22,13 +22,13 @@ class TestPolicies: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: Gitpod) -> None: policy = client.projects.policies.create() assert_matches_type(PolicyCreateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: Gitpod) -> None: policy = client.projects.policies.create( @@ -38,7 +38,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(PolicyCreateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: Gitpod) -> None: response = client.projects.policies.with_raw_response.create() @@ -48,7 +48,7 @@ def test_raw_response_create(self, client: Gitpod) -> None: policy = response.parse() assert_matches_type(PolicyCreateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: with client.projects.policies.with_streaming_response.create() as response: @@ -60,13 +60,13 @@ def test_streaming_response_create(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: Gitpod) -> None: policy = client.projects.policies.update() assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: Gitpod) -> None: policy = client.projects.policies.update( @@ -76,7 +76,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: Gitpod) -> None: response = client.projects.policies.with_raw_response.update() @@ -86,7 +86,7 @@ def test_raw_response_update(self, client: Gitpod) -> None: policy = response.parse() assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: Gitpod) -> None: with client.projects.policies.with_streaming_response.update() as response: @@ -98,13 +98,13 @@ def test_streaming_response_update(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: policy = client.projects.policies.list() assert_matches_type(SyncPoliciesPage[ProjectPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: policy = client.projects.policies.list( @@ -118,7 +118,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncPoliciesPage[ProjectPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.projects.policies.with_raw_response.list() @@ -128,7 +128,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: policy = response.parse() assert_matches_type(SyncPoliciesPage[ProjectPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.projects.policies.with_streaming_response.list() as response: @@ -140,13 +140,13 @@ def test_streaming_response_list(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: Gitpod) -> None: policy = client.projects.policies.delete() assert_matches_type(object, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete_with_all_params(self, client: Gitpod) -> None: policy = client.projects.policies.delete( @@ -155,7 +155,7 @@ def test_method_delete_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: response = client.projects.policies.with_raw_response.delete() @@ -165,7 +165,7 @@ def test_raw_response_delete(self, client: Gitpod) -> None: policy = response.parse() assert_matches_type(object, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: with client.projects.policies.with_streaming_response.delete() as response: @@ -179,15 +179,17 @@ def test_streaming_response_delete(self, client: Gitpod) -> None: class TestAsyncPolicies: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: policy = await async_client.projects.policies.create() assert_matches_type(PolicyCreateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: policy = await async_client.projects.policies.create( @@ -197,7 +199,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(PolicyCreateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: response = await async_client.projects.policies.with_raw_response.create() @@ -207,7 +209,7 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: policy = await response.parse() assert_matches_type(PolicyCreateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: async with async_client.projects.policies.with_streaming_response.create() as response: @@ -219,13 +221,13 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncGitpod) -> None: policy = await async_client.projects.policies.update() assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None: policy = await async_client.projects.policies.update( @@ -235,7 +237,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: response = await async_client.projects.policies.with_raw_response.update() @@ -245,7 +247,7 @@ async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: policy = await response.parse() assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncGitpod) -> None: async with async_client.projects.policies.with_streaming_response.update() as response: @@ -257,13 +259,13 @@ async def test_streaming_response_update(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: policy = await async_client.projects.policies.list() assert_matches_type(AsyncPoliciesPage[ProjectPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: policy = await async_client.projects.policies.list( @@ -277,7 +279,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(AsyncPoliciesPage[ProjectPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.projects.policies.with_raw_response.list() @@ -287,7 +289,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: policy = await response.parse() assert_matches_type(AsyncPoliciesPage[ProjectPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.projects.policies.with_streaming_response.list() as response: @@ -299,13 +301,13 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: policy = await async_client.projects.policies.delete() assert_matches_type(object, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> None: policy = await async_client.projects.policies.delete( @@ -314,7 +316,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: response = await async_client.projects.policies.with_raw_response.delete() @@ -324,7 +326,7 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: policy = await response.parse() assert_matches_type(object, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: async with async_client.projects.policies.with_streaming_response.delete() as response: diff --git a/tests/api_resources/runners/configurations/test_environment_classes.py b/tests/api_resources/runners/configurations/test_environment_classes.py index 1668612b..919e93d8 100644 --- a/tests/api_resources/runners/configurations/test_environment_classes.py +++ b/tests/api_resources/runners/configurations/test_environment_classes.py @@ -22,13 +22,13 @@ class TestEnvironmentClasses: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: Gitpod) -> None: environment_class = client.runners.configurations.environment_classes.create() assert_matches_type(EnvironmentClassCreateResponse, environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: Gitpod) -> None: environment_class = client.runners.configurations.environment_classes.create( @@ -48,7 +48,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(EnvironmentClassCreateResponse, environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: Gitpod) -> None: response = client.runners.configurations.environment_classes.with_raw_response.create() @@ -58,7 +58,7 @@ def test_raw_response_create(self, client: Gitpod) -> None: environment_class = response.parse() assert_matches_type(EnvironmentClassCreateResponse, environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: with client.runners.configurations.environment_classes.with_streaming_response.create() as response: @@ -70,13 +70,13 @@ def test_streaming_response_create(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: Gitpod) -> None: environment_class = client.runners.configurations.environment_classes.retrieve() assert_matches_type(EnvironmentClassRetrieveResponse, environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: environment_class = client.runners.configurations.environment_classes.retrieve( @@ -84,7 +84,7 @@ def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(EnvironmentClassRetrieveResponse, environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.runners.configurations.environment_classes.with_raw_response.retrieve() @@ -94,7 +94,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: environment_class = response.parse() assert_matches_type(EnvironmentClassRetrieveResponse, environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.runners.configurations.environment_classes.with_streaming_response.retrieve() as response: @@ -106,13 +106,13 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: Gitpod) -> None: environment_class = client.runners.configurations.environment_classes.update() assert_matches_type(object, environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: Gitpod) -> None: environment_class = client.runners.configurations.environment_classes.update( @@ -123,7 +123,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: Gitpod) -> None: response = client.runners.configurations.environment_classes.with_raw_response.update() @@ -133,7 +133,7 @@ def test_raw_response_update(self, client: Gitpod) -> None: environment_class = response.parse() assert_matches_type(object, environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: Gitpod) -> None: with client.runners.configurations.environment_classes.with_streaming_response.update() as response: @@ -145,13 +145,13 @@ def test_streaming_response_update(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: environment_class = client.runners.configurations.environment_classes.list() assert_matches_type(SyncEnvironmentClassesPage[EnvironmentClass], environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: environment_class = client.runners.configurations.environment_classes.list( @@ -171,7 +171,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncEnvironmentClassesPage[EnvironmentClass], environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.runners.configurations.environment_classes.with_raw_response.list() @@ -181,7 +181,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: environment_class = response.parse() assert_matches_type(SyncEnvironmentClassesPage[EnvironmentClass], environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.runners.configurations.environment_classes.with_streaming_response.list() as response: @@ -195,15 +195,17 @@ def test_streaming_response_list(self, client: Gitpod) -> None: class TestAsyncEnvironmentClasses: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: environment_class = await async_client.runners.configurations.environment_classes.create() assert_matches_type(EnvironmentClassCreateResponse, environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: environment_class = await async_client.runners.configurations.environment_classes.create( @@ -223,7 +225,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(EnvironmentClassCreateResponse, environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.configurations.environment_classes.with_raw_response.create() @@ -233,7 +235,7 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: environment_class = await response.parse() assert_matches_type(EnvironmentClassCreateResponse, environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: async with async_client.runners.configurations.environment_classes.with_streaming_response.create() as response: @@ -245,13 +247,13 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: environment_class = await async_client.runners.configurations.environment_classes.retrieve() assert_matches_type(EnvironmentClassRetrieveResponse, environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None: environment_class = await async_client.runners.configurations.environment_classes.retrieve( @@ -259,7 +261,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) ) assert_matches_type(EnvironmentClassRetrieveResponse, environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.configurations.environment_classes.with_raw_response.retrieve() @@ -269,7 +271,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: environment_class = await response.parse() assert_matches_type(EnvironmentClassRetrieveResponse, environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with ( @@ -283,13 +285,13 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncGitpod) -> None: environment_class = await async_client.runners.configurations.environment_classes.update() assert_matches_type(object, environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None: environment_class = await async_client.runners.configurations.environment_classes.update( @@ -300,7 +302,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.configurations.environment_classes.with_raw_response.update() @@ -310,7 +312,7 @@ async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: environment_class = await response.parse() assert_matches_type(object, environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncGitpod) -> None: async with async_client.runners.configurations.environment_classes.with_streaming_response.update() as response: @@ -322,13 +324,13 @@ async def test_streaming_response_update(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: environment_class = await async_client.runners.configurations.environment_classes.list() assert_matches_type(AsyncEnvironmentClassesPage[EnvironmentClass], environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: environment_class = await async_client.runners.configurations.environment_classes.list( @@ -348,7 +350,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(AsyncEnvironmentClassesPage[EnvironmentClass], environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.configurations.environment_classes.with_raw_response.list() @@ -358,7 +360,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: environment_class = await response.parse() assert_matches_type(AsyncEnvironmentClassesPage[EnvironmentClass], environment_class, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.runners.configurations.environment_classes.with_streaming_response.list() as response: diff --git a/tests/api_resources/runners/configurations/test_host_authentication_tokens.py b/tests/api_resources/runners/configurations/test_host_authentication_tokens.py index 7667d3ca..3e24dbc1 100644 --- a/tests/api_resources/runners/configurations/test_host_authentication_tokens.py +++ b/tests/api_resources/runners/configurations/test_host_authentication_tokens.py @@ -23,13 +23,13 @@ class TestHostAuthenticationTokens: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: Gitpod) -> None: host_authentication_token = client.runners.configurations.host_authentication_tokens.create() assert_matches_type(HostAuthenticationTokenCreateResponse, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: Gitpod) -> None: host_authentication_token = client.runners.configurations.host_authentication_tokens.create( @@ -43,7 +43,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(HostAuthenticationTokenCreateResponse, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: Gitpod) -> None: response = client.runners.configurations.host_authentication_tokens.with_raw_response.create() @@ -53,7 +53,7 @@ def test_raw_response_create(self, client: Gitpod) -> None: host_authentication_token = response.parse() assert_matches_type(HostAuthenticationTokenCreateResponse, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: with client.runners.configurations.host_authentication_tokens.with_streaming_response.create() as response: @@ -65,13 +65,13 @@ def test_streaming_response_create(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: Gitpod) -> None: host_authentication_token = client.runners.configurations.host_authentication_tokens.retrieve() assert_matches_type(HostAuthenticationTokenRetrieveResponse, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: host_authentication_token = client.runners.configurations.host_authentication_tokens.retrieve( @@ -79,7 +79,7 @@ def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(HostAuthenticationTokenRetrieveResponse, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.runners.configurations.host_authentication_tokens.with_raw_response.retrieve() @@ -89,7 +89,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: host_authentication_token = response.parse() assert_matches_type(HostAuthenticationTokenRetrieveResponse, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.runners.configurations.host_authentication_tokens.with_streaming_response.retrieve() as response: @@ -101,13 +101,13 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: Gitpod) -> None: host_authentication_token = client.runners.configurations.host_authentication_tokens.update() assert_matches_type(object, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: Gitpod) -> None: host_authentication_token = client.runners.configurations.host_authentication_tokens.update( @@ -118,7 +118,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: Gitpod) -> None: response = client.runners.configurations.host_authentication_tokens.with_raw_response.update() @@ -128,7 +128,7 @@ def test_raw_response_update(self, client: Gitpod) -> None: host_authentication_token = response.parse() assert_matches_type(object, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: Gitpod) -> None: with client.runners.configurations.host_authentication_tokens.with_streaming_response.update() as response: @@ -140,13 +140,13 @@ def test_streaming_response_update(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: host_authentication_token = client.runners.configurations.host_authentication_tokens.list() assert_matches_type(SyncTokensPage[HostAuthenticationToken], host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: host_authentication_token = client.runners.configurations.host_authentication_tokens.list( @@ -163,7 +163,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncTokensPage[HostAuthenticationToken], host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.runners.configurations.host_authentication_tokens.with_raw_response.list() @@ -173,7 +173,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: host_authentication_token = response.parse() assert_matches_type(SyncTokensPage[HostAuthenticationToken], host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.runners.configurations.host_authentication_tokens.with_streaming_response.list() as response: @@ -185,13 +185,13 @@ def test_streaming_response_list(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: Gitpod) -> None: host_authentication_token = client.runners.configurations.host_authentication_tokens.delete() assert_matches_type(object, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete_with_all_params(self, client: Gitpod) -> None: host_authentication_token = client.runners.configurations.host_authentication_tokens.delete( @@ -199,7 +199,7 @@ def test_method_delete_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: response = client.runners.configurations.host_authentication_tokens.with_raw_response.delete() @@ -209,7 +209,7 @@ def test_raw_response_delete(self, client: Gitpod) -> None: host_authentication_token = response.parse() assert_matches_type(object, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: with client.runners.configurations.host_authentication_tokens.with_streaming_response.delete() as response: @@ -223,15 +223,17 @@ def test_streaming_response_delete(self, client: Gitpod) -> None: class TestAsyncHostAuthenticationTokens: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: host_authentication_token = await async_client.runners.configurations.host_authentication_tokens.create() assert_matches_type(HostAuthenticationTokenCreateResponse, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: host_authentication_token = await async_client.runners.configurations.host_authentication_tokens.create( @@ -245,7 +247,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(HostAuthenticationTokenCreateResponse, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.configurations.host_authentication_tokens.with_raw_response.create() @@ -255,7 +257,7 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: host_authentication_token = await response.parse() assert_matches_type(HostAuthenticationTokenCreateResponse, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: async with ( @@ -269,13 +271,13 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: host_authentication_token = await async_client.runners.configurations.host_authentication_tokens.retrieve() assert_matches_type(HostAuthenticationTokenRetrieveResponse, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None: host_authentication_token = await async_client.runners.configurations.host_authentication_tokens.retrieve( @@ -283,7 +285,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) ) assert_matches_type(HostAuthenticationTokenRetrieveResponse, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.configurations.host_authentication_tokens.with_raw_response.retrieve() @@ -293,7 +295,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: host_authentication_token = await response.parse() assert_matches_type(HostAuthenticationTokenRetrieveResponse, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with ( @@ -307,13 +309,13 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncGitpod) -> None: host_authentication_token = await async_client.runners.configurations.host_authentication_tokens.update() assert_matches_type(object, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None: host_authentication_token = await async_client.runners.configurations.host_authentication_tokens.update( @@ -324,7 +326,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.configurations.host_authentication_tokens.with_raw_response.update() @@ -334,7 +336,7 @@ async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: host_authentication_token = await response.parse() assert_matches_type(object, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncGitpod) -> None: async with ( @@ -348,13 +350,13 @@ async def test_streaming_response_update(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: host_authentication_token = await async_client.runners.configurations.host_authentication_tokens.list() assert_matches_type(AsyncTokensPage[HostAuthenticationToken], host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: host_authentication_token = await async_client.runners.configurations.host_authentication_tokens.list( @@ -371,7 +373,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(AsyncTokensPage[HostAuthenticationToken], host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.configurations.host_authentication_tokens.with_raw_response.list() @@ -381,7 +383,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: host_authentication_token = await response.parse() assert_matches_type(AsyncTokensPage[HostAuthenticationToken], host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with ( @@ -395,13 +397,13 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: host_authentication_token = await async_client.runners.configurations.host_authentication_tokens.delete() assert_matches_type(object, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> None: host_authentication_token = await async_client.runners.configurations.host_authentication_tokens.delete( @@ -409,7 +411,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.configurations.host_authentication_tokens.with_raw_response.delete() @@ -419,7 +421,7 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: host_authentication_token = await response.parse() assert_matches_type(object, host_authentication_token, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: async with ( diff --git a/tests/api_resources/runners/configurations/test_schema.py b/tests/api_resources/runners/configurations/test_schema.py index 9d507253..e83271f8 100644 --- a/tests/api_resources/runners/configurations/test_schema.py +++ b/tests/api_resources/runners/configurations/test_schema.py @@ -17,13 +17,13 @@ class TestSchema: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: Gitpod) -> None: schema = client.runners.configurations.schema.retrieve() assert_matches_type(SchemaRetrieveResponse, schema, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: schema = client.runners.configurations.schema.retrieve( @@ -31,7 +31,7 @@ def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SchemaRetrieveResponse, schema, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.runners.configurations.schema.with_raw_response.retrieve() @@ -41,7 +41,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: schema = response.parse() assert_matches_type(SchemaRetrieveResponse, schema, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.runners.configurations.schema.with_streaming_response.retrieve() as response: @@ -55,15 +55,17 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: class TestAsyncSchema: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: schema = await async_client.runners.configurations.schema.retrieve() assert_matches_type(SchemaRetrieveResponse, schema, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None: schema = await async_client.runners.configurations.schema.retrieve( @@ -71,7 +73,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) ) assert_matches_type(SchemaRetrieveResponse, schema, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.configurations.schema.with_raw_response.retrieve() @@ -81,7 +83,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: schema = await response.parse() assert_matches_type(SchemaRetrieveResponse, schema, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with async_client.runners.configurations.schema.with_streaming_response.retrieve() as response: diff --git a/tests/api_resources/runners/configurations/test_scm_integrations.py b/tests/api_resources/runners/configurations/test_scm_integrations.py index a1685845..36bf74fd 100644 --- a/tests/api_resources/runners/configurations/test_scm_integrations.py +++ b/tests/api_resources/runners/configurations/test_scm_integrations.py @@ -22,13 +22,13 @@ class TestScmIntegrations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: Gitpod) -> None: scm_integration = client.runners.configurations.scm_integrations.create() assert_matches_type(ScmIntegrationCreateResponse, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: Gitpod) -> None: scm_integration = client.runners.configurations.scm_integrations.create( @@ -42,7 +42,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(ScmIntegrationCreateResponse, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: Gitpod) -> None: response = client.runners.configurations.scm_integrations.with_raw_response.create() @@ -52,7 +52,7 @@ def test_raw_response_create(self, client: Gitpod) -> None: scm_integration = response.parse() assert_matches_type(ScmIntegrationCreateResponse, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: with client.runners.configurations.scm_integrations.with_streaming_response.create() as response: @@ -64,13 +64,13 @@ def test_streaming_response_create(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: Gitpod) -> None: scm_integration = client.runners.configurations.scm_integrations.retrieve() assert_matches_type(ScmIntegrationRetrieveResponse, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: scm_integration = client.runners.configurations.scm_integrations.retrieve( @@ -78,7 +78,7 @@ def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(ScmIntegrationRetrieveResponse, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.runners.configurations.scm_integrations.with_raw_response.retrieve() @@ -88,7 +88,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: scm_integration = response.parse() assert_matches_type(ScmIntegrationRetrieveResponse, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.runners.configurations.scm_integrations.with_streaming_response.retrieve() as response: @@ -100,13 +100,13 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: Gitpod) -> None: scm_integration = client.runners.configurations.scm_integrations.update() assert_matches_type(object, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: Gitpod) -> None: scm_integration = client.runners.configurations.scm_integrations.update( @@ -118,7 +118,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: Gitpod) -> None: response = client.runners.configurations.scm_integrations.with_raw_response.update() @@ -128,7 +128,7 @@ def test_raw_response_update(self, client: Gitpod) -> None: scm_integration = response.parse() assert_matches_type(object, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: Gitpod) -> None: with client.runners.configurations.scm_integrations.with_streaming_response.update() as response: @@ -140,13 +140,13 @@ def test_streaming_response_update(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: scm_integration = client.runners.configurations.scm_integrations.list() assert_matches_type(SyncIntegrationsPage[ScmIntegration], scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: scm_integration = client.runners.configurations.scm_integrations.list( @@ -160,7 +160,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncIntegrationsPage[ScmIntegration], scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.runners.configurations.scm_integrations.with_raw_response.list() @@ -170,7 +170,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: scm_integration = response.parse() assert_matches_type(SyncIntegrationsPage[ScmIntegration], scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.runners.configurations.scm_integrations.with_streaming_response.list() as response: @@ -182,13 +182,13 @@ def test_streaming_response_list(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: Gitpod) -> None: scm_integration = client.runners.configurations.scm_integrations.delete() assert_matches_type(object, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete_with_all_params(self, client: Gitpod) -> None: scm_integration = client.runners.configurations.scm_integrations.delete( @@ -196,7 +196,7 @@ def test_method_delete_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: response = client.runners.configurations.scm_integrations.with_raw_response.delete() @@ -206,7 +206,7 @@ def test_raw_response_delete(self, client: Gitpod) -> None: scm_integration = response.parse() assert_matches_type(object, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: with client.runners.configurations.scm_integrations.with_streaming_response.delete() as response: @@ -220,15 +220,17 @@ def test_streaming_response_delete(self, client: Gitpod) -> None: class TestAsyncScmIntegrations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: scm_integration = await async_client.runners.configurations.scm_integrations.create() assert_matches_type(ScmIntegrationCreateResponse, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: scm_integration = await async_client.runners.configurations.scm_integrations.create( @@ -242,7 +244,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(ScmIntegrationCreateResponse, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.configurations.scm_integrations.with_raw_response.create() @@ -252,7 +254,7 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: scm_integration = await response.parse() assert_matches_type(ScmIntegrationCreateResponse, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: async with async_client.runners.configurations.scm_integrations.with_streaming_response.create() as response: @@ -264,13 +266,13 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: scm_integration = await async_client.runners.configurations.scm_integrations.retrieve() assert_matches_type(ScmIntegrationRetrieveResponse, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None: scm_integration = await async_client.runners.configurations.scm_integrations.retrieve( @@ -278,7 +280,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) ) assert_matches_type(ScmIntegrationRetrieveResponse, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.configurations.scm_integrations.with_raw_response.retrieve() @@ -288,7 +290,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: scm_integration = await response.parse() assert_matches_type(ScmIntegrationRetrieveResponse, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with async_client.runners.configurations.scm_integrations.with_streaming_response.retrieve() as response: @@ -300,13 +302,13 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncGitpod) -> None: scm_integration = await async_client.runners.configurations.scm_integrations.update() assert_matches_type(object, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None: scm_integration = await async_client.runners.configurations.scm_integrations.update( @@ -318,7 +320,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.configurations.scm_integrations.with_raw_response.update() @@ -328,7 +330,7 @@ async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: scm_integration = await response.parse() assert_matches_type(object, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncGitpod) -> None: async with async_client.runners.configurations.scm_integrations.with_streaming_response.update() as response: @@ -340,13 +342,13 @@ async def test_streaming_response_update(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: scm_integration = await async_client.runners.configurations.scm_integrations.list() assert_matches_type(AsyncIntegrationsPage[ScmIntegration], scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: scm_integration = await async_client.runners.configurations.scm_integrations.list( @@ -360,7 +362,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(AsyncIntegrationsPage[ScmIntegration], scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.configurations.scm_integrations.with_raw_response.list() @@ -370,7 +372,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: scm_integration = await response.parse() assert_matches_type(AsyncIntegrationsPage[ScmIntegration], scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.runners.configurations.scm_integrations.with_streaming_response.list() as response: @@ -382,13 +384,13 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: scm_integration = await async_client.runners.configurations.scm_integrations.delete() assert_matches_type(object, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> None: scm_integration = await async_client.runners.configurations.scm_integrations.delete( @@ -396,7 +398,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.configurations.scm_integrations.with_raw_response.delete() @@ -406,7 +408,7 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: scm_integration = await response.parse() assert_matches_type(object, scm_integration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: async with async_client.runners.configurations.scm_integrations.with_streaming_response.delete() as response: diff --git a/tests/api_resources/runners/test_configurations.py b/tests/api_resources/runners/test_configurations.py index 8732d185..cebba5e7 100644 --- a/tests/api_resources/runners/test_configurations.py +++ b/tests/api_resources/runners/test_configurations.py @@ -17,13 +17,13 @@ class TestConfigurations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_validate(self, client: Gitpod) -> None: configuration = client.runners.configurations.validate() assert_matches_type(ConfigurationValidateResponse, configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_validate_with_all_params(self, client: Gitpod) -> None: configuration = client.runners.configurations.validate( @@ -54,7 +54,7 @@ def test_method_validate_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(ConfigurationValidateResponse, configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_validate(self, client: Gitpod) -> None: response = client.runners.configurations.with_raw_response.validate() @@ -64,7 +64,7 @@ def test_raw_response_validate(self, client: Gitpod) -> None: configuration = response.parse() assert_matches_type(ConfigurationValidateResponse, configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_validate(self, client: Gitpod) -> None: with client.runners.configurations.with_streaming_response.validate() as response: @@ -78,15 +78,17 @@ def test_streaming_response_validate(self, client: Gitpod) -> None: class TestAsyncConfigurations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_validate(self, async_client: AsyncGitpod) -> None: configuration = await async_client.runners.configurations.validate() assert_matches_type(ConfigurationValidateResponse, configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_validate_with_all_params(self, async_client: AsyncGitpod) -> None: configuration = await async_client.runners.configurations.validate( @@ -117,7 +119,7 @@ async def test_method_validate_with_all_params(self, async_client: AsyncGitpod) ) assert_matches_type(ConfigurationValidateResponse, configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_validate(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.configurations.with_raw_response.validate() @@ -127,7 +129,7 @@ async def test_raw_response_validate(self, async_client: AsyncGitpod) -> None: configuration = await response.parse() assert_matches_type(ConfigurationValidateResponse, configuration, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_validate(self, async_client: AsyncGitpod) -> None: async with async_client.runners.configurations.with_streaming_response.validate() as response: diff --git a/tests/api_resources/runners/test_policies.py b/tests/api_resources/runners/test_policies.py index b94c9fff..8fa81fa5 100644 --- a/tests/api_resources/runners/test_policies.py +++ b/tests/api_resources/runners/test_policies.py @@ -22,13 +22,13 @@ class TestPolicies: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: Gitpod) -> None: policy = client.runners.policies.create() assert_matches_type(PolicyCreateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: Gitpod) -> None: policy = client.runners.policies.create( @@ -38,7 +38,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(PolicyCreateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: Gitpod) -> None: response = client.runners.policies.with_raw_response.create() @@ -48,7 +48,7 @@ def test_raw_response_create(self, client: Gitpod) -> None: policy = response.parse() assert_matches_type(PolicyCreateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: with client.runners.policies.with_streaming_response.create() as response: @@ -60,13 +60,13 @@ def test_streaming_response_create(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: Gitpod) -> None: policy = client.runners.policies.update() assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: Gitpod) -> None: policy = client.runners.policies.update( @@ -76,7 +76,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: Gitpod) -> None: response = client.runners.policies.with_raw_response.update() @@ -86,7 +86,7 @@ def test_raw_response_update(self, client: Gitpod) -> None: policy = response.parse() assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: Gitpod) -> None: with client.runners.policies.with_streaming_response.update() as response: @@ -98,13 +98,13 @@ def test_streaming_response_update(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: policy = client.runners.policies.list() assert_matches_type(SyncPoliciesPage[RunnerPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: policy = client.runners.policies.list( @@ -118,7 +118,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncPoliciesPage[RunnerPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.runners.policies.with_raw_response.list() @@ -128,7 +128,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: policy = response.parse() assert_matches_type(SyncPoliciesPage[RunnerPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.runners.policies.with_streaming_response.list() as response: @@ -140,13 +140,13 @@ def test_streaming_response_list(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: Gitpod) -> None: policy = client.runners.policies.delete() assert_matches_type(object, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete_with_all_params(self, client: Gitpod) -> None: policy = client.runners.policies.delete( @@ -155,7 +155,7 @@ def test_method_delete_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: response = client.runners.policies.with_raw_response.delete() @@ -165,7 +165,7 @@ def test_raw_response_delete(self, client: Gitpod) -> None: policy = response.parse() assert_matches_type(object, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: with client.runners.policies.with_streaming_response.delete() as response: @@ -179,15 +179,17 @@ def test_streaming_response_delete(self, client: Gitpod) -> None: class TestAsyncPolicies: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: policy = await async_client.runners.policies.create() assert_matches_type(PolicyCreateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: policy = await async_client.runners.policies.create( @@ -197,7 +199,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(PolicyCreateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.policies.with_raw_response.create() @@ -207,7 +209,7 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: policy = await response.parse() assert_matches_type(PolicyCreateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: async with async_client.runners.policies.with_streaming_response.create() as response: @@ -219,13 +221,13 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncGitpod) -> None: policy = await async_client.runners.policies.update() assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None: policy = await async_client.runners.policies.update( @@ -235,7 +237,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.policies.with_raw_response.update() @@ -245,7 +247,7 @@ async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: policy = await response.parse() assert_matches_type(PolicyUpdateResponse, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncGitpod) -> None: async with async_client.runners.policies.with_streaming_response.update() as response: @@ -257,13 +259,13 @@ async def test_streaming_response_update(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: policy = await async_client.runners.policies.list() assert_matches_type(AsyncPoliciesPage[RunnerPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: policy = await async_client.runners.policies.list( @@ -277,7 +279,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(AsyncPoliciesPage[RunnerPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.policies.with_raw_response.list() @@ -287,7 +289,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: policy = await response.parse() assert_matches_type(AsyncPoliciesPage[RunnerPolicy], policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.runners.policies.with_streaming_response.list() as response: @@ -299,13 +301,13 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: policy = await async_client.runners.policies.delete() assert_matches_type(object, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> None: policy = await async_client.runners.policies.delete( @@ -314,7 +316,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.policies.with_raw_response.delete() @@ -324,7 +326,7 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: policy = await response.parse() assert_matches_type(object, policy, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: async with async_client.runners.policies.with_streaming_response.delete() as response: diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index 2cf8e691..31390ba9 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -23,13 +23,13 @@ class TestAccounts: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: Gitpod) -> None: account = client.accounts.retrieve() assert_matches_type(AccountRetrieveResponse, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: account = client.accounts.retrieve( @@ -37,7 +37,7 @@ def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(AccountRetrieveResponse, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.accounts.with_raw_response.retrieve() @@ -47,7 +47,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: account = response.parse() assert_matches_type(AccountRetrieveResponse, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.accounts.with_streaming_response.retrieve() as response: @@ -59,7 +59,7 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: Gitpod) -> None: account = client.accounts.delete( @@ -67,7 +67,7 @@ def test_method_delete(self, client: Gitpod) -> None: ) assert_matches_type(object, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: response = client.accounts.with_raw_response.delete( @@ -79,7 +79,7 @@ def test_raw_response_delete(self, client: Gitpod) -> None: account = response.parse() assert_matches_type(object, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: with client.accounts.with_streaming_response.delete( @@ -93,7 +93,7 @@ def test_streaming_response_delete(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get_sso_login_url(self, client: Gitpod) -> None: account = client.accounts.get_sso_login_url( @@ -101,7 +101,7 @@ def test_method_get_sso_login_url(self, client: Gitpod) -> None: ) assert_matches_type(AccountGetSSOLoginURLResponse, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get_sso_login_url_with_all_params(self, client: Gitpod) -> None: account = client.accounts.get_sso_login_url( @@ -110,7 +110,7 @@ def test_method_get_sso_login_url_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(AccountGetSSOLoginURLResponse, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_get_sso_login_url(self, client: Gitpod) -> None: response = client.accounts.with_raw_response.get_sso_login_url( @@ -122,7 +122,7 @@ def test_raw_response_get_sso_login_url(self, client: Gitpod) -> None: account = response.parse() assert_matches_type(AccountGetSSOLoginURLResponse, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_get_sso_login_url(self, client: Gitpod) -> None: with client.accounts.with_streaming_response.get_sso_login_url( @@ -136,13 +136,13 @@ def test_streaming_response_get_sso_login_url(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_joinable_organizations(self, client: Gitpod) -> None: account = client.accounts.list_joinable_organizations() assert_matches_type(AccountListJoinableOrganizationsResponse, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_joinable_organizations_with_all_params(self, client: Gitpod) -> None: account = client.accounts.list_joinable_organizations( @@ -152,7 +152,7 @@ def test_method_list_joinable_organizations_with_all_params(self, client: Gitpod ) assert_matches_type(AccountListJoinableOrganizationsResponse, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list_joinable_organizations(self, client: Gitpod) -> None: response = client.accounts.with_raw_response.list_joinable_organizations() @@ -162,7 +162,7 @@ def test_raw_response_list_joinable_organizations(self, client: Gitpod) -> None: account = response.parse() assert_matches_type(AccountListJoinableOrganizationsResponse, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list_joinable_organizations(self, client: Gitpod) -> None: with client.accounts.with_streaming_response.list_joinable_organizations() as response: @@ -174,13 +174,13 @@ def test_streaming_response_list_joinable_organizations(self, client: Gitpod) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_login_providers(self, client: Gitpod) -> None: account = client.accounts.list_login_providers() assert_matches_type(SyncLoginProvidersPage[LoginProvider], account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_login_providers_with_all_params(self, client: Gitpod) -> None: account = client.accounts.list_login_providers( @@ -194,7 +194,7 @@ def test_method_list_login_providers_with_all_params(self, client: Gitpod) -> No ) assert_matches_type(SyncLoginProvidersPage[LoginProvider], account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list_login_providers(self, client: Gitpod) -> None: response = client.accounts.with_raw_response.list_login_providers() @@ -204,7 +204,7 @@ def test_raw_response_list_login_providers(self, client: Gitpod) -> None: account = response.parse() assert_matches_type(SyncLoginProvidersPage[LoginProvider], account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list_login_providers(self, client: Gitpod) -> None: with client.accounts.with_streaming_response.list_login_providers() as response: @@ -218,15 +218,17 @@ def test_streaming_response_list_login_providers(self, client: Gitpod) -> None: class TestAsyncAccounts: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: account = await async_client.accounts.retrieve() assert_matches_type(AccountRetrieveResponse, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None: account = await async_client.accounts.retrieve( @@ -234,7 +236,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) ) assert_matches_type(AccountRetrieveResponse, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.accounts.with_raw_response.retrieve() @@ -244,7 +246,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: account = await response.parse() assert_matches_type(AccountRetrieveResponse, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with async_client.accounts.with_streaming_response.retrieve() as response: @@ -256,7 +258,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: account = await async_client.accounts.delete( @@ -264,7 +266,7 @@ async def test_method_delete(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(object, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: response = await async_client.accounts.with_raw_response.delete( @@ -276,7 +278,7 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: account = await response.parse() assert_matches_type(object, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: async with async_client.accounts.with_streaming_response.delete( @@ -290,7 +292,7 @@ async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get_sso_login_url(self, async_client: AsyncGitpod) -> None: account = await async_client.accounts.get_sso_login_url( @@ -298,7 +300,7 @@ async def test_method_get_sso_login_url(self, async_client: AsyncGitpod) -> None ) assert_matches_type(AccountGetSSOLoginURLResponse, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get_sso_login_url_with_all_params(self, async_client: AsyncGitpod) -> None: account = await async_client.accounts.get_sso_login_url( @@ -307,7 +309,7 @@ async def test_method_get_sso_login_url_with_all_params(self, async_client: Asyn ) assert_matches_type(AccountGetSSOLoginURLResponse, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_get_sso_login_url(self, async_client: AsyncGitpod) -> None: response = await async_client.accounts.with_raw_response.get_sso_login_url( @@ -319,7 +321,7 @@ async def test_raw_response_get_sso_login_url(self, async_client: AsyncGitpod) - account = await response.parse() assert_matches_type(AccountGetSSOLoginURLResponse, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_get_sso_login_url(self, async_client: AsyncGitpod) -> None: async with async_client.accounts.with_streaming_response.get_sso_login_url( @@ -333,13 +335,13 @@ async def test_streaming_response_get_sso_login_url(self, async_client: AsyncGit assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_joinable_organizations(self, async_client: AsyncGitpod) -> None: account = await async_client.accounts.list_joinable_organizations() assert_matches_type(AccountListJoinableOrganizationsResponse, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_joinable_organizations_with_all_params(self, async_client: AsyncGitpod) -> None: account = await async_client.accounts.list_joinable_organizations( @@ -349,7 +351,7 @@ async def test_method_list_joinable_organizations_with_all_params(self, async_cl ) assert_matches_type(AccountListJoinableOrganizationsResponse, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list_joinable_organizations(self, async_client: AsyncGitpod) -> None: response = await async_client.accounts.with_raw_response.list_joinable_organizations() @@ -359,7 +361,7 @@ async def test_raw_response_list_joinable_organizations(self, async_client: Asyn account = await response.parse() assert_matches_type(AccountListJoinableOrganizationsResponse, account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list_joinable_organizations(self, async_client: AsyncGitpod) -> None: async with async_client.accounts.with_streaming_response.list_joinable_organizations() as response: @@ -371,13 +373,13 @@ async def test_streaming_response_list_joinable_organizations(self, async_client assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_login_providers(self, async_client: AsyncGitpod) -> None: account = await async_client.accounts.list_login_providers() assert_matches_type(AsyncLoginProvidersPage[LoginProvider], account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_login_providers_with_all_params(self, async_client: AsyncGitpod) -> None: account = await async_client.accounts.list_login_providers( @@ -391,7 +393,7 @@ async def test_method_list_login_providers_with_all_params(self, async_client: A ) assert_matches_type(AsyncLoginProvidersPage[LoginProvider], account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list_login_providers(self, async_client: AsyncGitpod) -> None: response = await async_client.accounts.with_raw_response.list_login_providers() @@ -401,7 +403,7 @@ async def test_raw_response_list_login_providers(self, async_client: AsyncGitpod account = await response.parse() assert_matches_type(AsyncLoginProvidersPage[LoginProvider], account, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list_login_providers(self, async_client: AsyncGitpod) -> None: async with async_client.accounts.with_streaming_response.list_login_providers() as response: diff --git a/tests/api_resources/test_editors.py b/tests/api_resources/test_editors.py index 4c77d22c..45b7012c 100644 --- a/tests/api_resources/test_editors.py +++ b/tests/api_resources/test_editors.py @@ -22,7 +22,7 @@ class TestEditors: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: Gitpod) -> None: editor = client.editors.retrieve( @@ -30,7 +30,7 @@ def test_method_retrieve(self, client: Gitpod) -> None: ) assert_matches_type(EditorRetrieveResponse, editor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.editors.with_raw_response.retrieve( @@ -42,7 +42,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: editor = response.parse() assert_matches_type(EditorRetrieveResponse, editor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.editors.with_streaming_response.retrieve( @@ -56,13 +56,13 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: editor = client.editors.list() assert_matches_type(SyncEditorsPage[Editor], editor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: editor = client.editors.list( @@ -76,7 +76,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncEditorsPage[Editor], editor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.editors.with_raw_response.list() @@ -86,7 +86,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: editor = response.parse() assert_matches_type(SyncEditorsPage[Editor], editor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.editors.with_streaming_response.list() as response: @@ -98,7 +98,7 @@ def test_streaming_response_list(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_resolve_url(self, client: Gitpod) -> None: editor = client.editors.resolve_url( @@ -108,7 +108,7 @@ def test_method_resolve_url(self, client: Gitpod) -> None: ) assert_matches_type(EditorResolveURLResponse, editor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_resolve_url(self, client: Gitpod) -> None: response = client.editors.with_raw_response.resolve_url( @@ -122,7 +122,7 @@ def test_raw_response_resolve_url(self, client: Gitpod) -> None: editor = response.parse() assert_matches_type(EditorResolveURLResponse, editor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_resolve_url(self, client: Gitpod) -> None: with client.editors.with_streaming_response.resolve_url( @@ -140,9 +140,11 @@ def test_streaming_response_resolve_url(self, client: Gitpod) -> None: class TestAsyncEditors: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: editor = await async_client.editors.retrieve( @@ -150,7 +152,7 @@ async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(EditorRetrieveResponse, editor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.editors.with_raw_response.retrieve( @@ -162,7 +164,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: editor = await response.parse() assert_matches_type(EditorRetrieveResponse, editor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with async_client.editors.with_streaming_response.retrieve( @@ -176,13 +178,13 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: editor = await async_client.editors.list() assert_matches_type(AsyncEditorsPage[Editor], editor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: editor = await async_client.editors.list( @@ -196,7 +198,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(AsyncEditorsPage[Editor], editor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.editors.with_raw_response.list() @@ -206,7 +208,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: editor = await response.parse() assert_matches_type(AsyncEditorsPage[Editor], editor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.editors.with_streaming_response.list() as response: @@ -218,7 +220,7 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_resolve_url(self, async_client: AsyncGitpod) -> None: editor = await async_client.editors.resolve_url( @@ -228,7 +230,7 @@ async def test_method_resolve_url(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(EditorResolveURLResponse, editor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_resolve_url(self, async_client: AsyncGitpod) -> None: response = await async_client.editors.with_raw_response.resolve_url( @@ -242,7 +244,7 @@ async def test_raw_response_resolve_url(self, async_client: AsyncGitpod) -> None editor = await response.parse() assert_matches_type(EditorResolveURLResponse, editor, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_resolve_url(self, async_client: AsyncGitpod) -> None: async with async_client.editors.with_streaming_response.resolve_url( diff --git a/tests/api_resources/test_environments.py b/tests/api_resources/test_environments.py index 979e659a..d7876b0e 100644 --- a/tests/api_resources/test_environments.py +++ b/tests/api_resources/test_environments.py @@ -26,13 +26,13 @@ class TestEnvironments: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: Gitpod) -> None: environment = client.environments.create() assert_matches_type(EnvironmentCreateResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: Gitpod) -> None: environment = client.environments.create( @@ -104,7 +104,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(EnvironmentCreateResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: Gitpod) -> None: response = client.environments.with_raw_response.create() @@ -114,7 +114,7 @@ def test_raw_response_create(self, client: Gitpod) -> None: environment = response.parse() assert_matches_type(EnvironmentCreateResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: with client.environments.with_streaming_response.create() as response: @@ -126,7 +126,7 @@ def test_streaming_response_create(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: Gitpod) -> None: environment = client.environments.retrieve( @@ -134,7 +134,7 @@ def test_method_retrieve(self, client: Gitpod) -> None: ) assert_matches_type(EnvironmentRetrieveResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.environments.with_raw_response.retrieve( @@ -146,7 +146,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: environment = response.parse() assert_matches_type(EnvironmentRetrieveResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.environments.with_streaming_response.retrieve( @@ -160,13 +160,13 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: Gitpod) -> None: environment = client.environments.update() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: Gitpod) -> None: environment = client.environments.update( @@ -218,7 +218,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: Gitpod) -> None: response = client.environments.with_raw_response.update() @@ -228,7 +228,7 @@ def test_raw_response_update(self, client: Gitpod) -> None: environment = response.parse() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: Gitpod) -> None: with client.environments.with_streaming_response.update() as response: @@ -240,13 +240,13 @@ def test_streaming_response_update(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: environment = client.environments.list() assert_matches_type(SyncEnvironmentsPage[Environment], environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: environment = client.environments.list( @@ -267,7 +267,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncEnvironmentsPage[Environment], environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.environments.with_raw_response.list() @@ -277,7 +277,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: environment = response.parse() assert_matches_type(SyncEnvironmentsPage[Environment], environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.environments.with_streaming_response.list() as response: @@ -289,13 +289,13 @@ def test_streaming_response_list(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: Gitpod) -> None: environment = client.environments.delete() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete_with_all_params(self, client: Gitpod) -> None: environment = client.environments.delete( @@ -304,7 +304,7 @@ def test_method_delete_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: response = client.environments.with_raw_response.delete() @@ -314,7 +314,7 @@ def test_raw_response_delete(self, client: Gitpod) -> None: environment = response.parse() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: with client.environments.with_streaming_response.delete() as response: @@ -326,7 +326,7 @@ def test_streaming_response_delete(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_environment_token(self, client: Gitpod) -> None: environment = client.environments.create_environment_token( @@ -334,7 +334,7 @@ def test_method_create_environment_token(self, client: Gitpod) -> None: ) assert_matches_type(EnvironmentCreateEnvironmentTokenResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create_environment_token(self, client: Gitpod) -> None: response = client.environments.with_raw_response.create_environment_token( @@ -346,7 +346,7 @@ def test_raw_response_create_environment_token(self, client: Gitpod) -> None: environment = response.parse() assert_matches_type(EnvironmentCreateEnvironmentTokenResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create_environment_token(self, client: Gitpod) -> None: with client.environments.with_streaming_response.create_environment_token( @@ -360,13 +360,13 @@ def test_streaming_response_create_environment_token(self, client: Gitpod) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_from_project(self, client: Gitpod) -> None: environment = client.environments.create_from_project() assert_matches_type(EnvironmentCreateFromProjectResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_from_project_with_all_params(self, client: Gitpod) -> None: environment = client.environments.create_from_project( @@ -439,7 +439,7 @@ def test_method_create_from_project_with_all_params(self, client: Gitpod) -> Non ) assert_matches_type(EnvironmentCreateFromProjectResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create_from_project(self, client: Gitpod) -> None: response = client.environments.with_raw_response.create_from_project() @@ -449,7 +449,7 @@ def test_raw_response_create_from_project(self, client: Gitpod) -> None: environment = response.parse() assert_matches_type(EnvironmentCreateFromProjectResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create_from_project(self, client: Gitpod) -> None: with client.environments.with_streaming_response.create_from_project() as response: @@ -461,13 +461,13 @@ def test_streaming_response_create_from_project(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_logs_token(self, client: Gitpod) -> None: environment = client.environments.create_logs_token() assert_matches_type(EnvironmentCreateLogsTokenResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_logs_token_with_all_params(self, client: Gitpod) -> None: environment = client.environments.create_logs_token( @@ -475,7 +475,7 @@ def test_method_create_logs_token_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(EnvironmentCreateLogsTokenResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create_logs_token(self, client: Gitpod) -> None: response = client.environments.with_raw_response.create_logs_token() @@ -485,7 +485,7 @@ def test_raw_response_create_logs_token(self, client: Gitpod) -> None: environment = response.parse() assert_matches_type(EnvironmentCreateLogsTokenResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create_logs_token(self, client: Gitpod) -> None: with client.environments.with_streaming_response.create_logs_token() as response: @@ -497,13 +497,13 @@ def test_streaming_response_create_logs_token(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_mark_active(self, client: Gitpod) -> None: environment = client.environments.mark_active() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_mark_active_with_all_params(self, client: Gitpod) -> None: environment = client.environments.mark_active( @@ -515,7 +515,7 @@ def test_method_mark_active_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_mark_active(self, client: Gitpod) -> None: response = client.environments.with_raw_response.mark_active() @@ -525,7 +525,7 @@ def test_raw_response_mark_active(self, client: Gitpod) -> None: environment = response.parse() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_mark_active(self, client: Gitpod) -> None: with client.environments.with_streaming_response.mark_active() as response: @@ -537,13 +537,13 @@ def test_streaming_response_mark_active(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_start(self, client: Gitpod) -> None: environment = client.environments.start() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_start_with_all_params(self, client: Gitpod) -> None: environment = client.environments.start( @@ -551,7 +551,7 @@ def test_method_start_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_start(self, client: Gitpod) -> None: response = client.environments.with_raw_response.start() @@ -561,7 +561,7 @@ def test_raw_response_start(self, client: Gitpod) -> None: environment = response.parse() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_start(self, client: Gitpod) -> None: with client.environments.with_streaming_response.start() as response: @@ -573,13 +573,13 @@ def test_streaming_response_start(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_stop(self, client: Gitpod) -> None: environment = client.environments.stop() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_stop_with_all_params(self, client: Gitpod) -> None: environment = client.environments.stop( @@ -587,7 +587,7 @@ def test_method_stop_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_stop(self, client: Gitpod) -> None: response = client.environments.with_raw_response.stop() @@ -597,7 +597,7 @@ def test_raw_response_stop(self, client: Gitpod) -> None: environment = response.parse() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_stop(self, client: Gitpod) -> None: with client.environments.with_streaming_response.stop() as response: @@ -609,13 +609,13 @@ def test_streaming_response_stop(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_unarchive(self, client: Gitpod) -> None: environment = client.environments.unarchive() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_unarchive_with_all_params(self, client: Gitpod) -> None: environment = client.environments.unarchive( @@ -623,7 +623,7 @@ def test_method_unarchive_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_unarchive(self, client: Gitpod) -> None: response = client.environments.with_raw_response.unarchive() @@ -633,7 +633,7 @@ def test_raw_response_unarchive(self, client: Gitpod) -> None: environment = response.parse() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_unarchive(self, client: Gitpod) -> None: with client.environments.with_streaming_response.unarchive() as response: @@ -647,15 +647,17 @@ def test_streaming_response_unarchive(self, client: Gitpod) -> None: class TestAsyncEnvironments: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.create() assert_matches_type(EnvironmentCreateResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.create( @@ -727,7 +729,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(EnvironmentCreateResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.with_raw_response.create() @@ -737,7 +739,7 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: environment = await response.parse() assert_matches_type(EnvironmentCreateResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: async with async_client.environments.with_streaming_response.create() as response: @@ -749,7 +751,7 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.retrieve( @@ -757,7 +759,7 @@ async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(EnvironmentRetrieveResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.with_raw_response.retrieve( @@ -769,7 +771,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: environment = await response.parse() assert_matches_type(EnvironmentRetrieveResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with async_client.environments.with_streaming_response.retrieve( @@ -783,13 +785,13 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.update() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.update( @@ -841,7 +843,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.with_raw_response.update() @@ -851,7 +853,7 @@ async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: environment = await response.parse() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncGitpod) -> None: async with async_client.environments.with_streaming_response.update() as response: @@ -863,13 +865,13 @@ async def test_streaming_response_update(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.list() assert_matches_type(AsyncEnvironmentsPage[Environment], environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.list( @@ -890,7 +892,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(AsyncEnvironmentsPage[Environment], environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.with_raw_response.list() @@ -900,7 +902,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: environment = await response.parse() assert_matches_type(AsyncEnvironmentsPage[Environment], environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.environments.with_streaming_response.list() as response: @@ -912,13 +914,13 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.delete() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.delete( @@ -927,7 +929,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.with_raw_response.delete() @@ -937,7 +939,7 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: environment = await response.parse() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: async with async_client.environments.with_streaming_response.delete() as response: @@ -949,7 +951,7 @@ async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_environment_token(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.create_environment_token( @@ -957,7 +959,7 @@ async def test_method_create_environment_token(self, async_client: AsyncGitpod) ) assert_matches_type(EnvironmentCreateEnvironmentTokenResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create_environment_token(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.with_raw_response.create_environment_token( @@ -969,7 +971,7 @@ async def test_raw_response_create_environment_token(self, async_client: AsyncGi environment = await response.parse() assert_matches_type(EnvironmentCreateEnvironmentTokenResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create_environment_token(self, async_client: AsyncGitpod) -> None: async with async_client.environments.with_streaming_response.create_environment_token( @@ -983,13 +985,13 @@ async def test_streaming_response_create_environment_token(self, async_client: A assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_from_project(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.create_from_project() assert_matches_type(EnvironmentCreateFromProjectResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_from_project_with_all_params(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.create_from_project( @@ -1062,7 +1064,7 @@ async def test_method_create_from_project_with_all_params(self, async_client: As ) assert_matches_type(EnvironmentCreateFromProjectResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create_from_project(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.with_raw_response.create_from_project() @@ -1072,7 +1074,7 @@ async def test_raw_response_create_from_project(self, async_client: AsyncGitpod) environment = await response.parse() assert_matches_type(EnvironmentCreateFromProjectResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create_from_project(self, async_client: AsyncGitpod) -> None: async with async_client.environments.with_streaming_response.create_from_project() as response: @@ -1084,13 +1086,13 @@ async def test_streaming_response_create_from_project(self, async_client: AsyncG assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_logs_token(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.create_logs_token() assert_matches_type(EnvironmentCreateLogsTokenResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_logs_token_with_all_params(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.create_logs_token( @@ -1098,7 +1100,7 @@ async def test_method_create_logs_token_with_all_params(self, async_client: Asyn ) assert_matches_type(EnvironmentCreateLogsTokenResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create_logs_token(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.with_raw_response.create_logs_token() @@ -1108,7 +1110,7 @@ async def test_raw_response_create_logs_token(self, async_client: AsyncGitpod) - environment = await response.parse() assert_matches_type(EnvironmentCreateLogsTokenResponse, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create_logs_token(self, async_client: AsyncGitpod) -> None: async with async_client.environments.with_streaming_response.create_logs_token() as response: @@ -1120,13 +1122,13 @@ async def test_streaming_response_create_logs_token(self, async_client: AsyncGit assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_mark_active(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.mark_active() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_mark_active_with_all_params(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.mark_active( @@ -1138,7 +1140,7 @@ async def test_method_mark_active_with_all_params(self, async_client: AsyncGitpo ) assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_mark_active(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.with_raw_response.mark_active() @@ -1148,7 +1150,7 @@ async def test_raw_response_mark_active(self, async_client: AsyncGitpod) -> None environment = await response.parse() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_mark_active(self, async_client: AsyncGitpod) -> None: async with async_client.environments.with_streaming_response.mark_active() as response: @@ -1160,13 +1162,13 @@ async def test_streaming_response_mark_active(self, async_client: AsyncGitpod) - assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_start(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.start() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_start_with_all_params(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.start( @@ -1174,7 +1176,7 @@ async def test_method_start_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_start(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.with_raw_response.start() @@ -1184,7 +1186,7 @@ async def test_raw_response_start(self, async_client: AsyncGitpod) -> None: environment = await response.parse() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_start(self, async_client: AsyncGitpod) -> None: async with async_client.environments.with_streaming_response.start() as response: @@ -1196,13 +1198,13 @@ async def test_streaming_response_start(self, async_client: AsyncGitpod) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_stop(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.stop() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_stop_with_all_params(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.stop( @@ -1210,7 +1212,7 @@ async def test_method_stop_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_stop(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.with_raw_response.stop() @@ -1220,7 +1222,7 @@ async def test_raw_response_stop(self, async_client: AsyncGitpod) -> None: environment = await response.parse() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_stop(self, async_client: AsyncGitpod) -> None: async with async_client.environments.with_streaming_response.stop() as response: @@ -1232,13 +1234,13 @@ async def test_streaming_response_stop(self, async_client: AsyncGitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_unarchive(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.unarchive() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_unarchive_with_all_params(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.unarchive( @@ -1246,7 +1248,7 @@ async def test_method_unarchive_with_all_params(self, async_client: AsyncGitpod) ) assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_unarchive(self, async_client: AsyncGitpod) -> None: response = await async_client.environments.with_raw_response.unarchive() @@ -1256,7 +1258,7 @@ async def test_raw_response_unarchive(self, async_client: AsyncGitpod) -> None: environment = await response.parse() assert_matches_type(object, environment, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_unarchive(self, async_client: AsyncGitpod) -> None: async with async_client.environments.with_streaming_response.unarchive() as response: diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py index fa926d85..64aff13d 100644 --- a/tests/api_resources/test_events.py +++ b/tests/api_resources/test_events.py @@ -19,13 +19,13 @@ class TestEvents: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: event = client.events.list() assert_matches_type(SyncEntriesPage[EventListResponse], event, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: event = client.events.list( @@ -44,7 +44,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncEntriesPage[EventListResponse], event, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.events.with_raw_response.list() @@ -54,7 +54,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: event = response.parse() assert_matches_type(SyncEntriesPage[EventListResponse], event, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.events.with_streaming_response.list() as response: @@ -66,13 +66,13 @@ def test_streaming_response_list(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism doesn't support JSONL responses yet") + @pytest.mark.skip(reason="Prism doesn't support application/jsonl responses") @parametrize def test_method_watch(self, client: Gitpod) -> None: event_stream = client.events.watch() assert_matches_type(JSONLDecoder[EventWatchResponse], event_stream, path=["response"]) - @pytest.mark.skip(reason="Prism doesn't support JSONL responses yet") + @pytest.mark.skip(reason="Prism doesn't support application/jsonl responses") @parametrize def test_method_watch_with_all_params(self, client: Gitpod) -> None: event_stream = client.events.watch( @@ -81,7 +81,7 @@ def test_method_watch_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(JSONLDecoder[EventWatchResponse], event_stream, path=["response"]) - @pytest.mark.skip(reason="Prism doesn't support JSONL responses yet") + @pytest.mark.skip(reason="Prism doesn't support application/jsonl responses") @parametrize def test_raw_response_watch(self, client: Gitpod) -> None: response = client.events.with_raw_response.watch() @@ -90,7 +90,7 @@ def test_raw_response_watch(self, client: Gitpod) -> None: stream = response.parse() stream.close() - @pytest.mark.skip(reason="Prism doesn't support JSONL responses yet") + @pytest.mark.skip(reason="Prism doesn't support application/jsonl responses") @parametrize def test_streaming_response_watch(self, client: Gitpod) -> None: with client.events.with_streaming_response.watch() as response: @@ -104,15 +104,17 @@ def test_streaming_response_watch(self, client: Gitpod) -> None: class TestAsyncEvents: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: event = await async_client.events.list() assert_matches_type(AsyncEntriesPage[EventListResponse], event, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: event = await async_client.events.list( @@ -131,7 +133,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(AsyncEntriesPage[EventListResponse], event, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.events.with_raw_response.list() @@ -141,7 +143,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: event = await response.parse() assert_matches_type(AsyncEntriesPage[EventListResponse], event, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.events.with_streaming_response.list() as response: @@ -153,13 +155,13 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism doesn't support JSONL responses yet") + @pytest.mark.skip(reason="Prism doesn't support application/jsonl responses") @parametrize async def test_method_watch(self, async_client: AsyncGitpod) -> None: event_stream = await async_client.events.watch() assert_matches_type(AsyncJSONLDecoder[EventWatchResponse], event_stream, path=["response"]) - @pytest.mark.skip(reason="Prism doesn't support JSONL responses yet") + @pytest.mark.skip(reason="Prism doesn't support application/jsonl responses") @parametrize async def test_method_watch_with_all_params(self, async_client: AsyncGitpod) -> None: event_stream = await async_client.events.watch( @@ -168,7 +170,7 @@ async def test_method_watch_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(AsyncJSONLDecoder[EventWatchResponse], event_stream, path=["response"]) - @pytest.mark.skip(reason="Prism doesn't support JSONL responses yet") + @pytest.mark.skip(reason="Prism doesn't support application/jsonl responses") @parametrize async def test_raw_response_watch(self, async_client: AsyncGitpod) -> None: response = await async_client.events.with_raw_response.watch() @@ -177,7 +179,7 @@ async def test_raw_response_watch(self, async_client: AsyncGitpod) -> None: stream = await response.parse() await stream.close() - @pytest.mark.skip(reason="Prism doesn't support JSONL responses yet") + @pytest.mark.skip(reason="Prism doesn't support application/jsonl responses") @parametrize async def test_streaming_response_watch(self, async_client: AsyncGitpod) -> None: async with async_client.events.with_streaming_response.watch() as response: diff --git a/tests/api_resources/test_gateways.py b/tests/api_resources/test_gateways.py index c41f7fbc..b18ceec7 100644 --- a/tests/api_resources/test_gateways.py +++ b/tests/api_resources/test_gateways.py @@ -18,13 +18,13 @@ class TestGateways: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: gateway = client.gateways.list() assert_matches_type(SyncGatewaysPage[Gateway], gateway, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: gateway = client.gateways.list( @@ -37,7 +37,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncGatewaysPage[Gateway], gateway, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.gateways.with_raw_response.list() @@ -47,7 +47,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: gateway = response.parse() assert_matches_type(SyncGatewaysPage[Gateway], gateway, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.gateways.with_streaming_response.list() as response: @@ -61,15 +61,17 @@ def test_streaming_response_list(self, client: Gitpod) -> None: class TestAsyncGateways: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: gateway = await async_client.gateways.list() assert_matches_type(AsyncGatewaysPage[Gateway], gateway, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: gateway = await async_client.gateways.list( @@ -82,7 +84,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(AsyncGatewaysPage[Gateway], gateway, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.gateways.with_raw_response.list() @@ -92,7 +94,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: gateway = await response.parse() assert_matches_type(AsyncGatewaysPage[Gateway], gateway, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.gateways.with_streaming_response.list() as response: diff --git a/tests/api_resources/test_groups.py b/tests/api_resources/test_groups.py index ed1c0380..dd784b4e 100644 --- a/tests/api_resources/test_groups.py +++ b/tests/api_resources/test_groups.py @@ -18,13 +18,13 @@ class TestGroups: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: group = client.groups.list() assert_matches_type(SyncGroupsPage[Group], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: group = client.groups.list( @@ -37,7 +37,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncGroupsPage[Group], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.groups.with_raw_response.list() @@ -47,7 +47,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: group = response.parse() assert_matches_type(SyncGroupsPage[Group], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.groups.with_streaming_response.list() as response: @@ -61,15 +61,17 @@ def test_streaming_response_list(self, client: Gitpod) -> None: class TestAsyncGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: group = await async_client.groups.list() assert_matches_type(AsyncGroupsPage[Group], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: group = await async_client.groups.list( @@ -82,7 +84,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(AsyncGroupsPage[Group], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.groups.with_raw_response.list() @@ -92,7 +94,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: group = await response.parse() assert_matches_type(AsyncGroupsPage[Group], group, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.groups.with_streaming_response.list() as response: diff --git a/tests/api_resources/test_identity.py b/tests/api_resources/test_identity.py index bcc639d1..de7afdff 100644 --- a/tests/api_resources/test_identity.py +++ b/tests/api_resources/test_identity.py @@ -21,13 +21,13 @@ class TestIdentity: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_exchange_token(self, client: Gitpod) -> None: identity = client.identity.exchange_token() assert_matches_type(IdentityExchangeTokenResponse, identity, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_exchange_token_with_all_params(self, client: Gitpod) -> None: identity = client.identity.exchange_token( @@ -35,7 +35,7 @@ def test_method_exchange_token_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(IdentityExchangeTokenResponse, identity, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_exchange_token(self, client: Gitpod) -> None: response = client.identity.with_raw_response.exchange_token() @@ -45,7 +45,7 @@ def test_raw_response_exchange_token(self, client: Gitpod) -> None: identity = response.parse() assert_matches_type(IdentityExchangeTokenResponse, identity, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_exchange_token(self, client: Gitpod) -> None: with client.identity.with_streaming_response.exchange_token() as response: @@ -57,13 +57,13 @@ def test_streaming_response_exchange_token(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get_authenticated_identity(self, client: Gitpod) -> None: identity = client.identity.get_authenticated_identity() assert_matches_type(IdentityGetAuthenticatedIdentityResponse, identity, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get_authenticated_identity_with_all_params(self, client: Gitpod) -> None: identity = client.identity.get_authenticated_identity( @@ -71,7 +71,7 @@ def test_method_get_authenticated_identity_with_all_params(self, client: Gitpod) ) assert_matches_type(IdentityGetAuthenticatedIdentityResponse, identity, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_get_authenticated_identity(self, client: Gitpod) -> None: response = client.identity.with_raw_response.get_authenticated_identity() @@ -81,7 +81,7 @@ def test_raw_response_get_authenticated_identity(self, client: Gitpod) -> None: identity = response.parse() assert_matches_type(IdentityGetAuthenticatedIdentityResponse, identity, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_get_authenticated_identity(self, client: Gitpod) -> None: with client.identity.with_streaming_response.get_authenticated_identity() as response: @@ -93,13 +93,13 @@ def test_streaming_response_get_authenticated_identity(self, client: Gitpod) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get_id_token(self, client: Gitpod) -> None: identity = client.identity.get_id_token() assert_matches_type(IdentityGetIDTokenResponse, identity, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get_id_token_with_all_params(self, client: Gitpod) -> None: identity = client.identity.get_id_token( @@ -108,7 +108,7 @@ def test_method_get_id_token_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(IdentityGetIDTokenResponse, identity, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_get_id_token(self, client: Gitpod) -> None: response = client.identity.with_raw_response.get_id_token() @@ -118,7 +118,7 @@ def test_raw_response_get_id_token(self, client: Gitpod) -> None: identity = response.parse() assert_matches_type(IdentityGetIDTokenResponse, identity, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_get_id_token(self, client: Gitpod) -> None: with client.identity.with_streaming_response.get_id_token() as response: @@ -132,15 +132,17 @@ def test_streaming_response_get_id_token(self, client: Gitpod) -> None: class TestAsyncIdentity: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_exchange_token(self, async_client: AsyncGitpod) -> None: identity = await async_client.identity.exchange_token() assert_matches_type(IdentityExchangeTokenResponse, identity, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_exchange_token_with_all_params(self, async_client: AsyncGitpod) -> None: identity = await async_client.identity.exchange_token( @@ -148,7 +150,7 @@ async def test_method_exchange_token_with_all_params(self, async_client: AsyncGi ) assert_matches_type(IdentityExchangeTokenResponse, identity, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_exchange_token(self, async_client: AsyncGitpod) -> None: response = await async_client.identity.with_raw_response.exchange_token() @@ -158,7 +160,7 @@ async def test_raw_response_exchange_token(self, async_client: AsyncGitpod) -> N identity = await response.parse() assert_matches_type(IdentityExchangeTokenResponse, identity, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_exchange_token(self, async_client: AsyncGitpod) -> None: async with async_client.identity.with_streaming_response.exchange_token() as response: @@ -170,13 +172,13 @@ async def test_streaming_response_exchange_token(self, async_client: AsyncGitpod assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get_authenticated_identity(self, async_client: AsyncGitpod) -> None: identity = await async_client.identity.get_authenticated_identity() assert_matches_type(IdentityGetAuthenticatedIdentityResponse, identity, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get_authenticated_identity_with_all_params(self, async_client: AsyncGitpod) -> None: identity = await async_client.identity.get_authenticated_identity( @@ -184,7 +186,7 @@ async def test_method_get_authenticated_identity_with_all_params(self, async_cli ) assert_matches_type(IdentityGetAuthenticatedIdentityResponse, identity, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_get_authenticated_identity(self, async_client: AsyncGitpod) -> None: response = await async_client.identity.with_raw_response.get_authenticated_identity() @@ -194,7 +196,7 @@ async def test_raw_response_get_authenticated_identity(self, async_client: Async identity = await response.parse() assert_matches_type(IdentityGetAuthenticatedIdentityResponse, identity, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_get_authenticated_identity(self, async_client: AsyncGitpod) -> None: async with async_client.identity.with_streaming_response.get_authenticated_identity() as response: @@ -206,13 +208,13 @@ async def test_streaming_response_get_authenticated_identity(self, async_client: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get_id_token(self, async_client: AsyncGitpod) -> None: identity = await async_client.identity.get_id_token() assert_matches_type(IdentityGetIDTokenResponse, identity, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get_id_token_with_all_params(self, async_client: AsyncGitpod) -> None: identity = await async_client.identity.get_id_token( @@ -221,7 +223,7 @@ async def test_method_get_id_token_with_all_params(self, async_client: AsyncGitp ) assert_matches_type(IdentityGetIDTokenResponse, identity, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_get_id_token(self, async_client: AsyncGitpod) -> None: response = await async_client.identity.with_raw_response.get_id_token() @@ -231,7 +233,7 @@ async def test_raw_response_get_id_token(self, async_client: AsyncGitpod) -> Non identity = await response.parse() assert_matches_type(IdentityGetIDTokenResponse, identity, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_get_id_token(self, async_client: AsyncGitpod) -> None: async with async_client.identity.with_streaming_response.get_id_token() as response: diff --git a/tests/api_resources/test_organizations.py b/tests/api_resources/test_organizations.py index da165e0b..ff2df938 100644 --- a/tests/api_resources/test_organizations.py +++ b/tests/api_resources/test_organizations.py @@ -24,7 +24,7 @@ class TestOrganizations: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: Gitpod) -> None: organization = client.organizations.create( @@ -32,7 +32,7 @@ def test_method_create(self, client: Gitpod) -> None: ) assert_matches_type(OrganizationCreateResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: Gitpod) -> None: organization = client.organizations.create( @@ -42,7 +42,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(OrganizationCreateResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: Gitpod) -> None: response = client.organizations.with_raw_response.create( @@ -54,7 +54,7 @@ def test_raw_response_create(self, client: Gitpod) -> None: organization = response.parse() assert_matches_type(OrganizationCreateResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: with client.organizations.with_streaming_response.create( @@ -68,7 +68,7 @@ def test_streaming_response_create(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: Gitpod) -> None: organization = client.organizations.retrieve( @@ -76,7 +76,7 @@ def test_method_retrieve(self, client: Gitpod) -> None: ) assert_matches_type(OrganizationRetrieveResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.organizations.with_raw_response.retrieve( @@ -88,7 +88,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: organization = response.parse() assert_matches_type(OrganizationRetrieveResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.organizations.with_streaming_response.retrieve( @@ -102,7 +102,7 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: Gitpod) -> None: organization = client.organizations.update( @@ -110,7 +110,7 @@ def test_method_update(self, client: Gitpod) -> None: ) assert_matches_type(OrganizationUpdateResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: Gitpod) -> None: organization = client.organizations.update( @@ -120,7 +120,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(OrganizationUpdateResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: Gitpod) -> None: response = client.organizations.with_raw_response.update( @@ -132,7 +132,7 @@ def test_raw_response_update(self, client: Gitpod) -> None: organization = response.parse() assert_matches_type(OrganizationUpdateResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: Gitpod) -> None: with client.organizations.with_streaming_response.update( @@ -146,7 +146,7 @@ def test_streaming_response_update(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: Gitpod) -> None: organization = client.organizations.delete( @@ -154,7 +154,7 @@ def test_method_delete(self, client: Gitpod) -> None: ) assert_matches_type(object, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: response = client.organizations.with_raw_response.delete( @@ -166,7 +166,7 @@ def test_raw_response_delete(self, client: Gitpod) -> None: organization = response.parse() assert_matches_type(object, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: with client.organizations.with_streaming_response.delete( @@ -180,13 +180,13 @@ def test_streaming_response_delete(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_join(self, client: Gitpod) -> None: organization = client.organizations.join() assert_matches_type(OrganizationJoinResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_join_with_all_params(self, client: Gitpod) -> None: organization = client.organizations.join( @@ -195,7 +195,7 @@ def test_method_join_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(OrganizationJoinResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_join(self, client: Gitpod) -> None: response = client.organizations.with_raw_response.join() @@ -205,7 +205,7 @@ def test_raw_response_join(self, client: Gitpod) -> None: organization = response.parse() assert_matches_type(OrganizationJoinResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_join(self, client: Gitpod) -> None: with client.organizations.with_streaming_response.join() as response: @@ -217,7 +217,7 @@ def test_streaming_response_join(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_leave(self, client: Gitpod) -> None: organization = client.organizations.leave( @@ -225,7 +225,7 @@ def test_method_leave(self, client: Gitpod) -> None: ) assert_matches_type(object, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_leave(self, client: Gitpod) -> None: response = client.organizations.with_raw_response.leave( @@ -237,7 +237,7 @@ def test_raw_response_leave(self, client: Gitpod) -> None: organization = response.parse() assert_matches_type(object, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_leave(self, client: Gitpod) -> None: with client.organizations.with_streaming_response.leave( @@ -251,7 +251,7 @@ def test_streaming_response_leave(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_members(self, client: Gitpod) -> None: organization = client.organizations.list_members( @@ -259,7 +259,7 @@ def test_method_list_members(self, client: Gitpod) -> None: ) assert_matches_type(SyncMembersPage[OrganizationMember], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_members_with_all_params(self, client: Gitpod) -> None: organization = client.organizations.list_members( @@ -273,7 +273,7 @@ def test_method_list_members_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncMembersPage[OrganizationMember], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list_members(self, client: Gitpod) -> None: response = client.organizations.with_raw_response.list_members( @@ -285,7 +285,7 @@ def test_raw_response_list_members(self, client: Gitpod) -> None: organization = response.parse() assert_matches_type(SyncMembersPage[OrganizationMember], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list_members(self, client: Gitpod) -> None: with client.organizations.with_streaming_response.list_members( @@ -299,7 +299,7 @@ def test_streaming_response_list_members(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_set_role(self, client: Gitpod) -> None: organization = client.organizations.set_role( @@ -308,7 +308,7 @@ def test_method_set_role(self, client: Gitpod) -> None: ) assert_matches_type(object, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_set_role_with_all_params(self, client: Gitpod) -> None: organization = client.organizations.set_role( @@ -318,7 +318,7 @@ def test_method_set_role_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_set_role(self, client: Gitpod) -> None: response = client.organizations.with_raw_response.set_role( @@ -331,7 +331,7 @@ def test_raw_response_set_role(self, client: Gitpod) -> None: organization = response.parse() assert_matches_type(object, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_set_role(self, client: Gitpod) -> None: with client.organizations.with_streaming_response.set_role( @@ -348,9 +348,11 @@ def test_streaming_response_set_role(self, client: Gitpod) -> None: class TestAsyncOrganizations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.create( @@ -358,7 +360,7 @@ async def test_method_create(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(OrganizationCreateResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.create( @@ -368,7 +370,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(OrganizationCreateResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.with_raw_response.create( @@ -380,7 +382,7 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: organization = await response.parse() assert_matches_type(OrganizationCreateResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.with_streaming_response.create( @@ -394,7 +396,7 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.retrieve( @@ -402,7 +404,7 @@ async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(OrganizationRetrieveResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.with_raw_response.retrieve( @@ -414,7 +416,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: organization = await response.parse() assert_matches_type(OrganizationRetrieveResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.with_streaming_response.retrieve( @@ -428,7 +430,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.update( @@ -436,7 +438,7 @@ async def test_method_update(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(OrganizationUpdateResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.update( @@ -446,7 +448,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(OrganizationUpdateResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.with_raw_response.update( @@ -458,7 +460,7 @@ async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: organization = await response.parse() assert_matches_type(OrganizationUpdateResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.with_streaming_response.update( @@ -472,7 +474,7 @@ async def test_streaming_response_update(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.delete( @@ -480,7 +482,7 @@ async def test_method_delete(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(object, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.with_raw_response.delete( @@ -492,7 +494,7 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: organization = await response.parse() assert_matches_type(object, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.with_streaming_response.delete( @@ -506,13 +508,13 @@ async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_join(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.join() assert_matches_type(OrganizationJoinResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_join_with_all_params(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.join( @@ -521,7 +523,7 @@ async def test_method_join_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(OrganizationJoinResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_join(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.with_raw_response.join() @@ -531,7 +533,7 @@ async def test_raw_response_join(self, async_client: AsyncGitpod) -> None: organization = await response.parse() assert_matches_type(OrganizationJoinResponse, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_join(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.with_streaming_response.join() as response: @@ -543,7 +545,7 @@ async def test_streaming_response_join(self, async_client: AsyncGitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_leave(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.leave( @@ -551,7 +553,7 @@ async def test_method_leave(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(object, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_leave(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.with_raw_response.leave( @@ -563,7 +565,7 @@ async def test_raw_response_leave(self, async_client: AsyncGitpod) -> None: organization = await response.parse() assert_matches_type(object, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_leave(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.with_streaming_response.leave( @@ -577,7 +579,7 @@ async def test_streaming_response_leave(self, async_client: AsyncGitpod) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_members(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.list_members( @@ -585,7 +587,7 @@ async def test_method_list_members(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(AsyncMembersPage[OrganizationMember], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_members_with_all_params(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.list_members( @@ -599,7 +601,7 @@ async def test_method_list_members_with_all_params(self, async_client: AsyncGitp ) assert_matches_type(AsyncMembersPage[OrganizationMember], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list_members(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.with_raw_response.list_members( @@ -611,7 +613,7 @@ async def test_raw_response_list_members(self, async_client: AsyncGitpod) -> Non organization = await response.parse() assert_matches_type(AsyncMembersPage[OrganizationMember], organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list_members(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.with_streaming_response.list_members( @@ -625,7 +627,7 @@ async def test_streaming_response_list_members(self, async_client: AsyncGitpod) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_set_role(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.set_role( @@ -634,7 +636,7 @@ async def test_method_set_role(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(object, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_set_role_with_all_params(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.set_role( @@ -644,7 +646,7 @@ async def test_method_set_role_with_all_params(self, async_client: AsyncGitpod) ) assert_matches_type(object, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_set_role(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.with_raw_response.set_role( @@ -657,7 +659,7 @@ async def test_raw_response_set_role(self, async_client: AsyncGitpod) -> None: organization = await response.parse() assert_matches_type(object, organization, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_set_role(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.with_streaming_response.set_role( diff --git a/tests/api_resources/test_projects.py b/tests/api_resources/test_projects.py index f33816b9..217a8453 100644 --- a/tests/api_resources/test_projects.py +++ b/tests/api_resources/test_projects.py @@ -24,7 +24,7 @@ class TestProjects: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: Gitpod) -> None: project = client.projects.create( @@ -33,7 +33,7 @@ def test_method_create(self, client: Gitpod) -> None: ) assert_matches_type(ProjectCreateResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: Gitpod) -> None: project = client.projects.create( @@ -62,7 +62,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(ProjectCreateResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: Gitpod) -> None: response = client.projects.with_raw_response.create( @@ -75,7 +75,7 @@ def test_raw_response_create(self, client: Gitpod) -> None: project = response.parse() assert_matches_type(ProjectCreateResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: with client.projects.with_streaming_response.create( @@ -90,13 +90,13 @@ def test_streaming_response_create(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: Gitpod) -> None: project = client.projects.retrieve() assert_matches_type(ProjectRetrieveResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: project = client.projects.retrieve( @@ -104,7 +104,7 @@ def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(ProjectRetrieveResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.projects.with_raw_response.retrieve() @@ -114,7 +114,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: project = response.parse() assert_matches_type(ProjectRetrieveResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.projects.with_streaming_response.retrieve() as response: @@ -126,13 +126,13 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: Gitpod) -> None: project = client.projects.update() assert_matches_type(ProjectUpdateResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: Gitpod) -> None: project = client.projects.update( @@ -162,7 +162,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(ProjectUpdateResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: Gitpod) -> None: response = client.projects.with_raw_response.update() @@ -172,7 +172,7 @@ def test_raw_response_update(self, client: Gitpod) -> None: project = response.parse() assert_matches_type(ProjectUpdateResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: Gitpod) -> None: with client.projects.with_streaming_response.update() as response: @@ -184,13 +184,13 @@ def test_streaming_response_update(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: project = client.projects.list() assert_matches_type(SyncProjectsPage[Project], project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: project = client.projects.list( @@ -204,7 +204,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncProjectsPage[Project], project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.projects.with_raw_response.list() @@ -214,7 +214,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: project = response.parse() assert_matches_type(SyncProjectsPage[Project], project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.projects.with_streaming_response.list() as response: @@ -226,13 +226,13 @@ def test_streaming_response_list(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: Gitpod) -> None: project = client.projects.delete() assert_matches_type(object, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete_with_all_params(self, client: Gitpod) -> None: project = client.projects.delete( @@ -240,7 +240,7 @@ def test_method_delete_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: response = client.projects.with_raw_response.delete() @@ -250,7 +250,7 @@ def test_raw_response_delete(self, client: Gitpod) -> None: project = response.parse() assert_matches_type(object, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: with client.projects.with_streaming_response.delete() as response: @@ -262,13 +262,13 @@ def test_streaming_response_delete(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_from_environment(self, client: Gitpod) -> None: project = client.projects.create_from_environment() assert_matches_type(ProjectCreateFromEnvironmentResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_from_environment_with_all_params(self, client: Gitpod) -> None: project = client.projects.create_from_environment( @@ -277,7 +277,7 @@ def test_method_create_from_environment_with_all_params(self, client: Gitpod) -> ) assert_matches_type(ProjectCreateFromEnvironmentResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create_from_environment(self, client: Gitpod) -> None: response = client.projects.with_raw_response.create_from_environment() @@ -287,7 +287,7 @@ def test_raw_response_create_from_environment(self, client: Gitpod) -> None: project = response.parse() assert_matches_type(ProjectCreateFromEnvironmentResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create_from_environment(self, client: Gitpod) -> None: with client.projects.with_streaming_response.create_from_environment() as response: @@ -301,9 +301,11 @@ def test_streaming_response_create_from_environment(self, client: Gitpod) -> Non class TestAsyncProjects: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: project = await async_client.projects.create( @@ -312,7 +314,7 @@ async def test_method_create(self, async_client: AsyncGitpod) -> None: ) assert_matches_type(ProjectCreateResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: project = await async_client.projects.create( @@ -341,7 +343,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(ProjectCreateResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: response = await async_client.projects.with_raw_response.create( @@ -354,7 +356,7 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: project = await response.parse() assert_matches_type(ProjectCreateResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: async with async_client.projects.with_streaming_response.create( @@ -369,13 +371,13 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: project = await async_client.projects.retrieve() assert_matches_type(ProjectRetrieveResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None: project = await async_client.projects.retrieve( @@ -383,7 +385,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) ) assert_matches_type(ProjectRetrieveResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.projects.with_raw_response.retrieve() @@ -393,7 +395,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: project = await response.parse() assert_matches_type(ProjectRetrieveResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with async_client.projects.with_streaming_response.retrieve() as response: @@ -405,13 +407,13 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncGitpod) -> None: project = await async_client.projects.update() assert_matches_type(ProjectUpdateResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None: project = await async_client.projects.update( @@ -441,7 +443,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(ProjectUpdateResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: response = await async_client.projects.with_raw_response.update() @@ -451,7 +453,7 @@ async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: project = await response.parse() assert_matches_type(ProjectUpdateResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncGitpod) -> None: async with async_client.projects.with_streaming_response.update() as response: @@ -463,13 +465,13 @@ async def test_streaming_response_update(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: project = await async_client.projects.list() assert_matches_type(AsyncProjectsPage[Project], project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: project = await async_client.projects.list( @@ -483,7 +485,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(AsyncProjectsPage[Project], project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.projects.with_raw_response.list() @@ -493,7 +495,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: project = await response.parse() assert_matches_type(AsyncProjectsPage[Project], project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.projects.with_streaming_response.list() as response: @@ -505,13 +507,13 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: project = await async_client.projects.delete() assert_matches_type(object, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> None: project = await async_client.projects.delete( @@ -519,7 +521,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: response = await async_client.projects.with_raw_response.delete() @@ -529,7 +531,7 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: project = await response.parse() assert_matches_type(object, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: async with async_client.projects.with_streaming_response.delete() as response: @@ -541,13 +543,13 @@ async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_from_environment(self, async_client: AsyncGitpod) -> None: project = await async_client.projects.create_from_environment() assert_matches_type(ProjectCreateFromEnvironmentResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_from_environment_with_all_params(self, async_client: AsyncGitpod) -> None: project = await async_client.projects.create_from_environment( @@ -556,7 +558,7 @@ async def test_method_create_from_environment_with_all_params(self, async_client ) assert_matches_type(ProjectCreateFromEnvironmentResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create_from_environment(self, async_client: AsyncGitpod) -> None: response = await async_client.projects.with_raw_response.create_from_environment() @@ -566,7 +568,7 @@ async def test_raw_response_create_from_environment(self, async_client: AsyncGit project = await response.parse() assert_matches_type(ProjectCreateFromEnvironmentResponse, project, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create_from_environment(self, async_client: AsyncGitpod) -> None: async with async_client.projects.with_streaming_response.create_from_environment() as response: diff --git a/tests/api_resources/test_runners.py b/tests/api_resources/test_runners.py index f20cf48d..56e374ae 100644 --- a/tests/api_resources/test_runners.py +++ b/tests/api_resources/test_runners.py @@ -25,13 +25,13 @@ class TestRunners: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: Gitpod) -> None: runner = client.runners.create() assert_matches_type(RunnerCreateResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: Gitpod) -> None: runner = client.runners.create( @@ -58,7 +58,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(RunnerCreateResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: Gitpod) -> None: response = client.runners.with_raw_response.create() @@ -68,7 +68,7 @@ def test_raw_response_create(self, client: Gitpod) -> None: runner = response.parse() assert_matches_type(RunnerCreateResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: with client.runners.with_streaming_response.create() as response: @@ -80,13 +80,13 @@ def test_streaming_response_create(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve(self, client: Gitpod) -> None: runner = client.runners.retrieve() assert_matches_type(RunnerRetrieveResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: runner = client.runners.retrieve( @@ -94,7 +94,7 @@ def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(RunnerRetrieveResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.runners.with_raw_response.retrieve() @@ -104,7 +104,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: runner = response.parse() assert_matches_type(RunnerRetrieveResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.runners.with_streaming_response.retrieve() as response: @@ -116,13 +116,13 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update(self, client: Gitpod) -> None: runner = client.runners.update() assert_matches_type(object, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_with_all_params(self, client: Gitpod) -> None: runner = client.runners.update( @@ -146,7 +146,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update(self, client: Gitpod) -> None: response = client.runners.with_raw_response.update() @@ -156,7 +156,7 @@ def test_raw_response_update(self, client: Gitpod) -> None: runner = response.parse() assert_matches_type(object, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update(self, client: Gitpod) -> None: with client.runners.with_streaming_response.update() as response: @@ -168,13 +168,13 @@ def test_streaming_response_update(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: runner = client.runners.list() assert_matches_type(SyncRunnersPage[Runner], runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: runner = client.runners.list( @@ -192,7 +192,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncRunnersPage[Runner], runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.runners.with_raw_response.list() @@ -202,7 +202,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: runner = response.parse() assert_matches_type(SyncRunnersPage[Runner], runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.runners.with_streaming_response.list() as response: @@ -214,13 +214,13 @@ def test_streaming_response_list(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: Gitpod) -> None: runner = client.runners.delete() assert_matches_type(object, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete_with_all_params(self, client: Gitpod) -> None: runner = client.runners.delete( @@ -229,7 +229,7 @@ def test_method_delete_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: response = client.runners.with_raw_response.delete() @@ -239,7 +239,7 @@ def test_raw_response_delete(self, client: Gitpod) -> None: runner = response.parse() assert_matches_type(object, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: with client.runners.with_streaming_response.delete() as response: @@ -251,13 +251,13 @@ def test_streaming_response_delete(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_check_authentication_for_host(self, client: Gitpod) -> None: runner = client.runners.check_authentication_for_host() assert_matches_type(RunnerCheckAuthenticationForHostResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_check_authentication_for_host_with_all_params(self, client: Gitpod) -> None: runner = client.runners.check_authentication_for_host( @@ -266,7 +266,7 @@ def test_method_check_authentication_for_host_with_all_params(self, client: Gitp ) assert_matches_type(RunnerCheckAuthenticationForHostResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_check_authentication_for_host(self, client: Gitpod) -> None: response = client.runners.with_raw_response.check_authentication_for_host() @@ -276,7 +276,7 @@ def test_raw_response_check_authentication_for_host(self, client: Gitpod) -> Non runner = response.parse() assert_matches_type(RunnerCheckAuthenticationForHostResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_check_authentication_for_host(self, client: Gitpod) -> None: with client.runners.with_streaming_response.check_authentication_for_host() as response: @@ -288,13 +288,13 @@ def test_streaming_response_check_authentication_for_host(self, client: Gitpod) assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_runner_token(self, client: Gitpod) -> None: runner = client.runners.create_runner_token() assert_matches_type(RunnerCreateRunnerTokenResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_runner_token_with_all_params(self, client: Gitpod) -> None: runner = client.runners.create_runner_token( @@ -302,7 +302,7 @@ def test_method_create_runner_token_with_all_params(self, client: Gitpod) -> Non ) assert_matches_type(RunnerCreateRunnerTokenResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create_runner_token(self, client: Gitpod) -> None: response = client.runners.with_raw_response.create_runner_token() @@ -312,7 +312,7 @@ def test_raw_response_create_runner_token(self, client: Gitpod) -> None: runner = response.parse() assert_matches_type(RunnerCreateRunnerTokenResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create_runner_token(self, client: Gitpod) -> None: with client.runners.with_streaming_response.create_runner_token() as response: @@ -324,13 +324,13 @@ def test_streaming_response_create_runner_token(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_parse_context_url(self, client: Gitpod) -> None: runner = client.runners.parse_context_url() assert_matches_type(RunnerParseContextURLResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_parse_context_url_with_all_params(self, client: Gitpod) -> None: runner = client.runners.parse_context_url( @@ -339,7 +339,7 @@ def test_method_parse_context_url_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(RunnerParseContextURLResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_parse_context_url(self, client: Gitpod) -> None: response = client.runners.with_raw_response.parse_context_url() @@ -349,7 +349,7 @@ def test_raw_response_parse_context_url(self, client: Gitpod) -> None: runner = response.parse() assert_matches_type(RunnerParseContextURLResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_parse_context_url(self, client: Gitpod) -> None: with client.runners.with_streaming_response.parse_context_url() as response: @@ -363,15 +363,17 @@ def test_streaming_response_parse_context_url(self, client: Gitpod) -> None: class TestAsyncRunners: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: runner = await async_client.runners.create() assert_matches_type(RunnerCreateResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: runner = await async_client.runners.create( @@ -398,7 +400,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(RunnerCreateResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.with_raw_response.create() @@ -408,7 +410,7 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: runner = await response.parse() assert_matches_type(RunnerCreateResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: async with async_client.runners.with_streaming_response.create() as response: @@ -420,13 +422,13 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: runner = await async_client.runners.retrieve() assert_matches_type(RunnerRetrieveResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None: runner = await async_client.runners.retrieve( @@ -434,7 +436,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) ) assert_matches_type(RunnerRetrieveResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.with_raw_response.retrieve() @@ -444,7 +446,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: runner = await response.parse() assert_matches_type(RunnerRetrieveResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with async_client.runners.with_streaming_response.retrieve() as response: @@ -456,13 +458,13 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update(self, async_client: AsyncGitpod) -> None: runner = await async_client.runners.update() assert_matches_type(object, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None: runner = await async_client.runners.update( @@ -486,7 +488,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.with_raw_response.update() @@ -496,7 +498,7 @@ async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: runner = await response.parse() assert_matches_type(object, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update(self, async_client: AsyncGitpod) -> None: async with async_client.runners.with_streaming_response.update() as response: @@ -508,13 +510,13 @@ async def test_streaming_response_update(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: runner = await async_client.runners.list() assert_matches_type(AsyncRunnersPage[Runner], runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: runner = await async_client.runners.list( @@ -532,7 +534,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(AsyncRunnersPage[Runner], runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.with_raw_response.list() @@ -542,7 +544,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: runner = await response.parse() assert_matches_type(AsyncRunnersPage[Runner], runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.runners.with_streaming_response.list() as response: @@ -554,13 +556,13 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: runner = await async_client.runners.delete() assert_matches_type(object, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> None: runner = await async_client.runners.delete( @@ -569,7 +571,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.with_raw_response.delete() @@ -579,7 +581,7 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: runner = await response.parse() assert_matches_type(object, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: async with async_client.runners.with_streaming_response.delete() as response: @@ -591,13 +593,13 @@ async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_check_authentication_for_host(self, async_client: AsyncGitpod) -> None: runner = await async_client.runners.check_authentication_for_host() assert_matches_type(RunnerCheckAuthenticationForHostResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_check_authentication_for_host_with_all_params(self, async_client: AsyncGitpod) -> None: runner = await async_client.runners.check_authentication_for_host( @@ -606,7 +608,7 @@ async def test_method_check_authentication_for_host_with_all_params(self, async_ ) assert_matches_type(RunnerCheckAuthenticationForHostResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_check_authentication_for_host(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.with_raw_response.check_authentication_for_host() @@ -616,7 +618,7 @@ async def test_raw_response_check_authentication_for_host(self, async_client: As runner = await response.parse() assert_matches_type(RunnerCheckAuthenticationForHostResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_check_authentication_for_host(self, async_client: AsyncGitpod) -> None: async with async_client.runners.with_streaming_response.check_authentication_for_host() as response: @@ -628,13 +630,13 @@ async def test_streaming_response_check_authentication_for_host(self, async_clie assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_runner_token(self, async_client: AsyncGitpod) -> None: runner = await async_client.runners.create_runner_token() assert_matches_type(RunnerCreateRunnerTokenResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_runner_token_with_all_params(self, async_client: AsyncGitpod) -> None: runner = await async_client.runners.create_runner_token( @@ -642,7 +644,7 @@ async def test_method_create_runner_token_with_all_params(self, async_client: As ) assert_matches_type(RunnerCreateRunnerTokenResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create_runner_token(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.with_raw_response.create_runner_token() @@ -652,7 +654,7 @@ async def test_raw_response_create_runner_token(self, async_client: AsyncGitpod) runner = await response.parse() assert_matches_type(RunnerCreateRunnerTokenResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create_runner_token(self, async_client: AsyncGitpod) -> None: async with async_client.runners.with_streaming_response.create_runner_token() as response: @@ -664,13 +666,13 @@ async def test_streaming_response_create_runner_token(self, async_client: AsyncG assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_parse_context_url(self, async_client: AsyncGitpod) -> None: runner = await async_client.runners.parse_context_url() assert_matches_type(RunnerParseContextURLResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_parse_context_url_with_all_params(self, async_client: AsyncGitpod) -> None: runner = await async_client.runners.parse_context_url( @@ -679,7 +681,7 @@ async def test_method_parse_context_url_with_all_params(self, async_client: Asyn ) assert_matches_type(RunnerParseContextURLResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_parse_context_url(self, async_client: AsyncGitpod) -> None: response = await async_client.runners.with_raw_response.parse_context_url() @@ -689,7 +691,7 @@ async def test_raw_response_parse_context_url(self, async_client: AsyncGitpod) - runner = await response.parse() assert_matches_type(RunnerParseContextURLResponse, runner, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_parse_context_url(self, async_client: AsyncGitpod) -> None: async with async_client.runners.with_streaming_response.parse_context_url() as response: diff --git a/tests/api_resources/test_secrets.py b/tests/api_resources/test_secrets.py index 02a47669..ddaaae29 100644 --- a/tests/api_resources/test_secrets.py +++ b/tests/api_resources/test_secrets.py @@ -22,13 +22,13 @@ class TestSecrets: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create(self, client: Gitpod) -> None: secret = client.secrets.create() assert_matches_type(SecretCreateResponse, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_create_with_all_params(self, client: Gitpod) -> None: secret = client.secrets.create( @@ -45,7 +45,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SecretCreateResponse, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_create(self, client: Gitpod) -> None: response = client.secrets.with_raw_response.create() @@ -55,7 +55,7 @@ def test_raw_response_create(self, client: Gitpod) -> None: secret = response.parse() assert_matches_type(SecretCreateResponse, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: with client.secrets.with_streaming_response.create() as response: @@ -67,13 +67,13 @@ def test_streaming_response_create(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: secret = client.secrets.list() assert_matches_type(SyncSecretsPage[Secret], secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: secret = client.secrets.list( @@ -93,7 +93,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncSecretsPage[Secret], secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.secrets.with_raw_response.list() @@ -103,7 +103,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: secret = response.parse() assert_matches_type(SyncSecretsPage[Secret], secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.secrets.with_streaming_response.list() as response: @@ -115,13 +115,13 @@ def test_streaming_response_list(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: Gitpod) -> None: secret = client.secrets.delete() assert_matches_type(object, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete_with_all_params(self, client: Gitpod) -> None: secret = client.secrets.delete( @@ -129,7 +129,7 @@ def test_method_delete_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: response = client.secrets.with_raw_response.delete() @@ -139,7 +139,7 @@ def test_raw_response_delete(self, client: Gitpod) -> None: secret = response.parse() assert_matches_type(object, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: with client.secrets.with_streaming_response.delete() as response: @@ -151,13 +151,13 @@ def test_streaming_response_delete(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get_value(self, client: Gitpod) -> None: secret = client.secrets.get_value() assert_matches_type(SecretGetValueResponse, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get_value_with_all_params(self, client: Gitpod) -> None: secret = client.secrets.get_value( @@ -165,7 +165,7 @@ def test_method_get_value_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SecretGetValueResponse, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_get_value(self, client: Gitpod) -> None: response = client.secrets.with_raw_response.get_value() @@ -175,7 +175,7 @@ def test_raw_response_get_value(self, client: Gitpod) -> None: secret = response.parse() assert_matches_type(SecretGetValueResponse, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_get_value(self, client: Gitpod) -> None: with client.secrets.with_streaming_response.get_value() as response: @@ -187,13 +187,13 @@ def test_streaming_response_get_value(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_value(self, client: Gitpod) -> None: secret = client.secrets.update_value() assert_matches_type(object, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_update_value_with_all_params(self, client: Gitpod) -> None: secret = client.secrets.update_value( @@ -202,7 +202,7 @@ def test_method_update_value_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_update_value(self, client: Gitpod) -> None: response = client.secrets.with_raw_response.update_value() @@ -212,7 +212,7 @@ def test_raw_response_update_value(self, client: Gitpod) -> None: secret = response.parse() assert_matches_type(object, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_update_value(self, client: Gitpod) -> None: with client.secrets.with_streaming_response.update_value() as response: @@ -226,15 +226,17 @@ def test_streaming_response_update_value(self, client: Gitpod) -> None: class TestAsyncSecrets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: secret = await async_client.secrets.create() assert_matches_type(SecretCreateResponse, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: secret = await async_client.secrets.create( @@ -251,7 +253,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(SecretCreateResponse, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: response = await async_client.secrets.with_raw_response.create() @@ -261,7 +263,7 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: secret = await response.parse() assert_matches_type(SecretCreateResponse, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: async with async_client.secrets.with_streaming_response.create() as response: @@ -273,13 +275,13 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: secret = await async_client.secrets.list() assert_matches_type(AsyncSecretsPage[Secret], secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: secret = await async_client.secrets.list( @@ -299,7 +301,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(AsyncSecretsPage[Secret], secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.secrets.with_raw_response.list() @@ -309,7 +311,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: secret = await response.parse() assert_matches_type(AsyncSecretsPage[Secret], secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.secrets.with_streaming_response.list() as response: @@ -321,13 +323,13 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: secret = await async_client.secrets.delete() assert_matches_type(object, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> None: secret = await async_client.secrets.delete( @@ -335,7 +337,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: response = await async_client.secrets.with_raw_response.delete() @@ -345,7 +347,7 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: secret = await response.parse() assert_matches_type(object, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: async with async_client.secrets.with_streaming_response.delete() as response: @@ -357,13 +359,13 @@ async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get_value(self, async_client: AsyncGitpod) -> None: secret = await async_client.secrets.get_value() assert_matches_type(SecretGetValueResponse, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get_value_with_all_params(self, async_client: AsyncGitpod) -> None: secret = await async_client.secrets.get_value( @@ -371,7 +373,7 @@ async def test_method_get_value_with_all_params(self, async_client: AsyncGitpod) ) assert_matches_type(SecretGetValueResponse, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_get_value(self, async_client: AsyncGitpod) -> None: response = await async_client.secrets.with_raw_response.get_value() @@ -381,7 +383,7 @@ async def test_raw_response_get_value(self, async_client: AsyncGitpod) -> None: secret = await response.parse() assert_matches_type(SecretGetValueResponse, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_get_value(self, async_client: AsyncGitpod) -> None: async with async_client.secrets.with_streaming_response.get_value() as response: @@ -393,13 +395,13 @@ async def test_streaming_response_get_value(self, async_client: AsyncGitpod) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_value(self, async_client: AsyncGitpod) -> None: secret = await async_client.secrets.update_value() assert_matches_type(object, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_update_value_with_all_params(self, async_client: AsyncGitpod) -> None: secret = await async_client.secrets.update_value( @@ -408,7 +410,7 @@ async def test_method_update_value_with_all_params(self, async_client: AsyncGitp ) assert_matches_type(object, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_update_value(self, async_client: AsyncGitpod) -> None: response = await async_client.secrets.with_raw_response.update_value() @@ -418,7 +420,7 @@ async def test_raw_response_update_value(self, async_client: AsyncGitpod) -> Non secret = await response.parse() assert_matches_type(object, secret, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_update_value(self, async_client: AsyncGitpod) -> None: async with async_client.secrets.with_streaming_response.update_value() as response: diff --git a/tests/api_resources/test_usage.py b/tests/api_resources/test_usage.py index 9a005f95..a203b817 100644 --- a/tests/api_resources/test_usage.py +++ b/tests/api_resources/test_usage.py @@ -19,13 +19,13 @@ class TestUsage: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_environment_runtime_records(self, client: Gitpod) -> None: usage = client.usage.list_environment_runtime_records() assert_matches_type(SyncRecordsPage[EnvironmentUsageRecord], usage, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_environment_runtime_records_with_all_params(self, client: Gitpod) -> None: usage = client.usage.list_environment_runtime_records( @@ -45,7 +45,7 @@ def test_method_list_environment_runtime_records_with_all_params(self, client: G ) assert_matches_type(SyncRecordsPage[EnvironmentUsageRecord], usage, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list_environment_runtime_records(self, client: Gitpod) -> None: response = client.usage.with_raw_response.list_environment_runtime_records() @@ -55,7 +55,7 @@ def test_raw_response_list_environment_runtime_records(self, client: Gitpod) -> usage = response.parse() assert_matches_type(SyncRecordsPage[EnvironmentUsageRecord], usage, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list_environment_runtime_records(self, client: Gitpod) -> None: with client.usage.with_streaming_response.list_environment_runtime_records() as response: @@ -69,15 +69,17 @@ def test_streaming_response_list_environment_runtime_records(self, client: Gitpo class TestAsyncUsage: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_environment_runtime_records(self, async_client: AsyncGitpod) -> None: usage = await async_client.usage.list_environment_runtime_records() assert_matches_type(AsyncRecordsPage[EnvironmentUsageRecord], usage, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_environment_runtime_records_with_all_params(self, async_client: AsyncGitpod) -> None: usage = await async_client.usage.list_environment_runtime_records( @@ -97,7 +99,7 @@ async def test_method_list_environment_runtime_records_with_all_params(self, asy ) assert_matches_type(AsyncRecordsPage[EnvironmentUsageRecord], usage, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list_environment_runtime_records(self, async_client: AsyncGitpod) -> None: response = await async_client.usage.with_raw_response.list_environment_runtime_records() @@ -107,7 +109,7 @@ async def test_raw_response_list_environment_runtime_records(self, async_client: usage = await response.parse() assert_matches_type(AsyncRecordsPage[EnvironmentUsageRecord], usage, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list_environment_runtime_records(self, async_client: AsyncGitpod) -> None: async with async_client.usage.with_streaming_response.list_environment_runtime_records() as response: diff --git a/tests/api_resources/test_users.py b/tests/api_resources/test_users.py index b5875362..cfe22b3d 100644 --- a/tests/api_resources/test_users.py +++ b/tests/api_resources/test_users.py @@ -17,13 +17,13 @@ class TestUsers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get_authenticated_user(self, client: Gitpod) -> None: user = client.users.get_authenticated_user() assert_matches_type(UserGetAuthenticatedUserResponse, user, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get_authenticated_user_with_all_params(self, client: Gitpod) -> None: user = client.users.get_authenticated_user( @@ -31,7 +31,7 @@ def test_method_get_authenticated_user_with_all_params(self, client: Gitpod) -> ) assert_matches_type(UserGetAuthenticatedUserResponse, user, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_get_authenticated_user(self, client: Gitpod) -> None: response = client.users.with_raw_response.get_authenticated_user() @@ -41,7 +41,7 @@ def test_raw_response_get_authenticated_user(self, client: Gitpod) -> None: user = response.parse() assert_matches_type(UserGetAuthenticatedUserResponse, user, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_get_authenticated_user(self, client: Gitpod) -> None: with client.users.with_streaming_response.get_authenticated_user() as response: @@ -53,13 +53,13 @@ def test_streaming_response_get_authenticated_user(self, client: Gitpod) -> None assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_set_suspended(self, client: Gitpod) -> None: user = client.users.set_suspended() assert_matches_type(object, user, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_set_suspended_with_all_params(self, client: Gitpod) -> None: user = client.users.set_suspended( @@ -68,7 +68,7 @@ def test_method_set_suspended_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, user, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_set_suspended(self, client: Gitpod) -> None: response = client.users.with_raw_response.set_suspended() @@ -78,7 +78,7 @@ def test_raw_response_set_suspended(self, client: Gitpod) -> None: user = response.parse() assert_matches_type(object, user, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_set_suspended(self, client: Gitpod) -> None: with client.users.with_streaming_response.set_suspended() as response: @@ -92,15 +92,17 @@ def test_streaming_response_set_suspended(self, client: Gitpod) -> None: class TestAsyncUsers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get_authenticated_user(self, async_client: AsyncGitpod) -> None: user = await async_client.users.get_authenticated_user() assert_matches_type(UserGetAuthenticatedUserResponse, user, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get_authenticated_user_with_all_params(self, async_client: AsyncGitpod) -> None: user = await async_client.users.get_authenticated_user( @@ -108,7 +110,7 @@ async def test_method_get_authenticated_user_with_all_params(self, async_client: ) assert_matches_type(UserGetAuthenticatedUserResponse, user, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_get_authenticated_user(self, async_client: AsyncGitpod) -> None: response = await async_client.users.with_raw_response.get_authenticated_user() @@ -118,7 +120,7 @@ async def test_raw_response_get_authenticated_user(self, async_client: AsyncGitp user = await response.parse() assert_matches_type(UserGetAuthenticatedUserResponse, user, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_get_authenticated_user(self, async_client: AsyncGitpod) -> None: async with async_client.users.with_streaming_response.get_authenticated_user() as response: @@ -130,13 +132,13 @@ async def test_streaming_response_get_authenticated_user(self, async_client: Asy assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_set_suspended(self, async_client: AsyncGitpod) -> None: user = await async_client.users.set_suspended() assert_matches_type(object, user, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_set_suspended_with_all_params(self, async_client: AsyncGitpod) -> None: user = await async_client.users.set_suspended( @@ -145,7 +147,7 @@ async def test_method_set_suspended_with_all_params(self, async_client: AsyncGit ) assert_matches_type(object, user, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_set_suspended(self, async_client: AsyncGitpod) -> None: response = await async_client.users.with_raw_response.set_suspended() @@ -155,7 +157,7 @@ async def test_raw_response_set_suspended(self, async_client: AsyncGitpod) -> No user = await response.parse() assert_matches_type(object, user, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_set_suspended(self, async_client: AsyncGitpod) -> None: async with async_client.users.with_streaming_response.set_suspended() as response: diff --git a/tests/api_resources/users/test_dotfiles.py b/tests/api_resources/users/test_dotfiles.py index ff40da72..6d2ebe96 100644 --- a/tests/api_resources/users/test_dotfiles.py +++ b/tests/api_resources/users/test_dotfiles.py @@ -17,13 +17,13 @@ class TestDotfiles: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get(self, client: Gitpod) -> None: dotfile = client.users.dotfiles.get() assert_matches_type(DotfileGetResponse, dotfile, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get_with_all_params(self, client: Gitpod) -> None: dotfile = client.users.dotfiles.get( @@ -31,7 +31,7 @@ def test_method_get_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(DotfileGetResponse, dotfile, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_get(self, client: Gitpod) -> None: response = client.users.dotfiles.with_raw_response.get() @@ -41,7 +41,7 @@ def test_raw_response_get(self, client: Gitpod) -> None: dotfile = response.parse() assert_matches_type(DotfileGetResponse, dotfile, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_get(self, client: Gitpod) -> None: with client.users.dotfiles.with_streaming_response.get() as response: @@ -53,13 +53,13 @@ def test_streaming_response_get(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_set(self, client: Gitpod) -> None: dotfile = client.users.dotfiles.set() assert_matches_type(object, dotfile, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_set_with_all_params(self, client: Gitpod) -> None: dotfile = client.users.dotfiles.set( @@ -67,7 +67,7 @@ def test_method_set_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, dotfile, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_set(self, client: Gitpod) -> None: response = client.users.dotfiles.with_raw_response.set() @@ -77,7 +77,7 @@ def test_raw_response_set(self, client: Gitpod) -> None: dotfile = response.parse() assert_matches_type(object, dotfile, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_set(self, client: Gitpod) -> None: with client.users.dotfiles.with_streaming_response.set() as response: @@ -91,15 +91,17 @@ def test_streaming_response_set(self, client: Gitpod) -> None: class TestAsyncDotfiles: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get(self, async_client: AsyncGitpod) -> None: dotfile = await async_client.users.dotfiles.get() assert_matches_type(DotfileGetResponse, dotfile, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get_with_all_params(self, async_client: AsyncGitpod) -> None: dotfile = await async_client.users.dotfiles.get( @@ -107,7 +109,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncGitpod) -> No ) assert_matches_type(DotfileGetResponse, dotfile, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_get(self, async_client: AsyncGitpod) -> None: response = await async_client.users.dotfiles.with_raw_response.get() @@ -117,7 +119,7 @@ async def test_raw_response_get(self, async_client: AsyncGitpod) -> None: dotfile = await response.parse() assert_matches_type(DotfileGetResponse, dotfile, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_get(self, async_client: AsyncGitpod) -> None: async with async_client.users.dotfiles.with_streaming_response.get() as response: @@ -129,13 +131,13 @@ async def test_streaming_response_get(self, async_client: AsyncGitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_set(self, async_client: AsyncGitpod) -> None: dotfile = await async_client.users.dotfiles.set() assert_matches_type(object, dotfile, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_set_with_all_params(self, async_client: AsyncGitpod) -> None: dotfile = await async_client.users.dotfiles.set( @@ -143,7 +145,7 @@ async def test_method_set_with_all_params(self, async_client: AsyncGitpod) -> No ) assert_matches_type(object, dotfile, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_set(self, async_client: AsyncGitpod) -> None: response = await async_client.users.dotfiles.with_raw_response.set() @@ -153,7 +155,7 @@ async def test_raw_response_set(self, async_client: AsyncGitpod) -> None: dotfile = await response.parse() assert_matches_type(object, dotfile, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_set(self, async_client: AsyncGitpod) -> None: async with async_client.users.dotfiles.with_streaming_response.set() as response: diff --git a/tests/api_resources/users/test_pats.py b/tests/api_resources/users/test_pats.py index 34611629..d00d8d20 100644 --- a/tests/api_resources/users/test_pats.py +++ b/tests/api_resources/users/test_pats.py @@ -18,13 +18,13 @@ class TestPats: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: pat = client.users.pats.list() assert_matches_type(SyncPersonalAccessTokensPage[PersonalAccessToken], pat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: pat = client.users.pats.list( @@ -38,7 +38,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(SyncPersonalAccessTokensPage[PersonalAccessToken], pat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.users.pats.with_raw_response.list() @@ -48,7 +48,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: pat = response.parse() assert_matches_type(SyncPersonalAccessTokensPage[PersonalAccessToken], pat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.users.pats.with_streaming_response.list() as response: @@ -60,13 +60,13 @@ def test_streaming_response_list(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete(self, client: Gitpod) -> None: pat = client.users.pats.delete() assert_matches_type(object, pat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_delete_with_all_params(self, client: Gitpod) -> None: pat = client.users.pats.delete( @@ -74,7 +74,7 @@ def test_method_delete_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(object, pat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: response = client.users.pats.with_raw_response.delete() @@ -84,7 +84,7 @@ def test_raw_response_delete(self, client: Gitpod) -> None: pat = response.parse() assert_matches_type(object, pat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: with client.users.pats.with_streaming_response.delete() as response: @@ -96,13 +96,13 @@ def test_streaming_response_delete(self, client: Gitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get(self, client: Gitpod) -> None: pat = client.users.pats.get() assert_matches_type(PatGetResponse, pat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_get_with_all_params(self, client: Gitpod) -> None: pat = client.users.pats.get( @@ -110,7 +110,7 @@ def test_method_get_with_all_params(self, client: Gitpod) -> None: ) assert_matches_type(PatGetResponse, pat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_get(self, client: Gitpod) -> None: response = client.users.pats.with_raw_response.get() @@ -120,7 +120,7 @@ def test_raw_response_get(self, client: Gitpod) -> None: pat = response.parse() assert_matches_type(PatGetResponse, pat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_get(self, client: Gitpod) -> None: with client.users.pats.with_streaming_response.get() as response: @@ -134,15 +134,17 @@ def test_streaming_response_get(self, client: Gitpod) -> None: class TestAsyncPats: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: pat = await async_client.users.pats.list() assert_matches_type(AsyncPersonalAccessTokensPage[PersonalAccessToken], pat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: pat = await async_client.users.pats.list( @@ -156,7 +158,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N ) assert_matches_type(AsyncPersonalAccessTokensPage[PersonalAccessToken], pat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.users.pats.with_raw_response.list() @@ -166,7 +168,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: pat = await response.parse() assert_matches_type(AsyncPersonalAccessTokensPage[PersonalAccessToken], pat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.users.pats.with_streaming_response.list() as response: @@ -178,13 +180,13 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: pat = await async_client.users.pats.delete() assert_matches_type(object, pat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> None: pat = await async_client.users.pats.delete( @@ -192,7 +194,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> ) assert_matches_type(object, pat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: response = await async_client.users.pats.with_raw_response.delete() @@ -202,7 +204,7 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: pat = await response.parse() assert_matches_type(object, pat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: async with async_client.users.pats.with_streaming_response.delete() as response: @@ -214,13 +216,13 @@ async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get(self, async_client: AsyncGitpod) -> None: pat = await async_client.users.pats.get() assert_matches_type(PatGetResponse, pat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_get_with_all_params(self, async_client: AsyncGitpod) -> None: pat = await async_client.users.pats.get( @@ -228,7 +230,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncGitpod) -> No ) assert_matches_type(PatGetResponse, pat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_get(self, async_client: AsyncGitpod) -> None: response = await async_client.users.pats.with_raw_response.get() @@ -238,7 +240,7 @@ async def test_raw_response_get(self, async_client: AsyncGitpod) -> None: pat = await response.parse() assert_matches_type(PatGetResponse, pat, path=["response"]) - @pytest.mark.skip() + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_get(self, async_client: AsyncGitpod) -> None: async with async_client.users.pats.with_streaming_response.get() as response: diff --git a/tests/conftest.py b/tests/conftest.py index 2dc77cd3..8697828c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,13 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + from __future__ import annotations import os import logging from typing import TYPE_CHECKING, Iterator, AsyncIterator +import httpx import pytest from pytest_asyncio import is_async_test -from gitpod import Gitpod, AsyncGitpod +from gitpod import Gitpod, AsyncGitpod, DefaultAioHttpClient +from gitpod._utils import is_dict if TYPE_CHECKING: from _pytest.fixtures import FixtureRequest # pyright: ignore[reportPrivateImportUsage] @@ -25,6 +29,19 @@ def pytest_collection_modifyitems(items: list[pytest.Function]) -> None: for async_test in pytest_asyncio_tests: async_test.add_marker(session_scope_marker, append=False) + # We skip tests that use both the aiohttp client and respx_mock as respx_mock + # doesn't support custom transports. + for item in items: + if "async_client" not in item.fixturenames or "respx_mock" not in item.fixturenames: + continue + + if not hasattr(item, "callspec"): + continue + + async_client_param = item.callspec.params.get("async_client") + if is_dict(async_client_param) and async_client_param.get("http_client") == "aiohttp": + item.add_marker(pytest.mark.skip(reason="aiohttp client is not compatible with respx_mock")) + base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -43,9 +60,25 @@ def client(request: FixtureRequest) -> Iterator[Gitpod]: @pytest.fixture(scope="session") async def async_client(request: FixtureRequest) -> AsyncIterator[AsyncGitpod]: - strict = getattr(request, "param", True) - if not isinstance(strict, bool): - raise TypeError(f"Unexpected fixture parameter type {type(strict)}, expected {bool}") - - async with AsyncGitpod(base_url=base_url, bearer_token=bearer_token, _strict_response_validation=strict) as client: + param = getattr(request, "param", True) + + # defaults + strict = True + http_client: None | httpx.AsyncClient = None + + if isinstance(param, bool): + strict = param + elif is_dict(param): + strict = param.get("strict", True) + assert isinstance(strict, bool) + + http_client_type = param.get("http_client", "httpx") + if http_client_type == "aiohttp": + http_client = DefaultAioHttpClient() + else: + raise TypeError(f"Unexpected fixture parameter type {type(param)}, expected bool or dict") + + async with AsyncGitpod( + base_url=base_url, bearer_token=bearer_token, _strict_response_validation=strict, http_client=http_client + ) as client: yield client diff --git a/tests/test_client.py b/tests/test_client.py index a2433c91..cb493a90 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -6,13 +6,10 @@ import os import sys import json -import time import asyncio import inspect -import subprocess import tracemalloc from typing import Any, Union, cast -from textwrap import dedent from unittest import mock from typing_extensions import Literal @@ -23,12 +20,19 @@ from gitpod import Gitpod, AsyncGitpod, APIResponseValidationError from gitpod._types import Omit -from gitpod._utils import maybe_transform +from gitpod._utils import asyncify from gitpod._models import BaseModel, FinalRequestOptions -from gitpod._constants import RAW_RESPONSE_HEADER from gitpod._exceptions import GitpodError, APIStatusError, APITimeoutError, APIResponseValidationError -from gitpod._base_client import DEFAULT_TIMEOUT, HTTPX_DEFAULT_TIMEOUT, BaseClient, make_request_options -from gitpod.types.identity_get_authenticated_identity_params import IdentityGetAuthenticatedIdentityParams +from gitpod._base_client import ( + DEFAULT_TIMEOUT, + HTTPX_DEFAULT_TIMEOUT, + BaseClient, + OtherPlatform, + DefaultHttpxClient, + DefaultAsyncHttpxClient, + get_platform, + make_request_options, +) from .utils import update_env @@ -190,6 +194,7 @@ def test_copy_signature(self) -> None: copy_param = copy_signature.parameters.get(name) assert copy_param is not None, f"copy() signature is missing the {name} param" + @pytest.mark.skipif(sys.version_info >= (3, 10), reason="fails because of a memory leak that started from 3.12") def test_copy_build_request(self) -> None: options = FinalRequestOptions(method="get", url="/foo") @@ -468,7 +473,7 @@ def test_request_extra_query(self) -> None: def test_multipart_repeating_array(self, client: Gitpod) -> None: request = client._build_request( FinalRequestOptions.construct( - method="get", + method="post", url="/foo", headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"}, json_data={"array": ["foo", "bar"]}, @@ -736,34 +741,23 @@ def test_parse_retry_after_header(self, remaining_retries: int, retry_after: str @mock.patch("gitpod._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: + def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, client: Gitpod) -> None: respx_mock.post("/gitpod.v1.IdentityService/GetAuthenticatedIdentity").mock( side_effect=httpx.TimeoutException("Test timeout error") ) with pytest.raises(APITimeoutError): - self.client.post( - "/gitpod.v1.IdentityService/GetAuthenticatedIdentity", - body=cast(object, maybe_transform({}, IdentityGetAuthenticatedIdentityParams)), - cast_to=httpx.Response, - options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, - ) + client.identity.with_streaming_response.get_authenticated_identity().__enter__() assert _get_open_connections(self.client) == 0 @mock.patch("gitpod._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: + def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter, client: Gitpod) -> None: respx_mock.post("/gitpod.v1.IdentityService/GetAuthenticatedIdentity").mock(return_value=httpx.Response(500)) with pytest.raises(APIStatusError): - self.client.post( - "/gitpod.v1.IdentityService/GetAuthenticatedIdentity", - body=cast(object, maybe_transform({}, IdentityGetAuthenticatedIdentityParams)), - cast_to=httpx.Response, - options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, - ) - + client.identity.with_streaming_response.get_authenticated_identity().__enter__() assert _get_open_connections(self.client) == 0 @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) @@ -847,6 +841,28 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: assert response.http_request.headers.get("x-stainless-retry-count") == "42" + 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") + + client = DefaultHttpxClient() + + mounts = tuple(client._mounts.items()) + assert len(mounts) == 1 + assert mounts[0][0].pattern == "https://" + + @pytest.mark.filterwarnings("ignore:.*deprecated.*:DeprecationWarning") + def test_default_client_creation(self) -> None: + # Ensure that the client can be initialized without any exceptions + DefaultHttpxClient( + verify=True, + cert=None, + trust_env=True, + http1=True, + http2=False, + limits=httpx.Limits(max_connections=100, max_keepalive_connections=20), + ) + @pytest.mark.respx(base_url=base_url) def test_follow_redirects(self, respx_mock: MockRouter) -> None: # Test that the default follow_redirects=True allows following redirects @@ -1013,6 +1029,7 @@ def test_copy_signature(self) -> None: copy_param = copy_signature.parameters.get(name) assert copy_param is not None, f"copy() signature is missing the {name} param" + @pytest.mark.skipif(sys.version_info >= (3, 10), reason="fails because of a memory leak that started from 3.12") def test_copy_build_request(self) -> None: options = FinalRequestOptions(method="get", url="/foo") @@ -1291,7 +1308,7 @@ def test_request_extra_query(self) -> None: def test_multipart_repeating_array(self, async_client: AsyncGitpod) -> None: request = async_client._build_request( FinalRequestOptions.construct( - method="get", + method="post", url="/foo", headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"}, json_data={"array": ["foo", "bar"]}, @@ -1563,34 +1580,23 @@ async def test_parse_retry_after_header(self, remaining_retries: int, retry_afte @mock.patch("gitpod._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: + async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, async_client: AsyncGitpod) -> None: respx_mock.post("/gitpod.v1.IdentityService/GetAuthenticatedIdentity").mock( side_effect=httpx.TimeoutException("Test timeout error") ) with pytest.raises(APITimeoutError): - await self.client.post( - "/gitpod.v1.IdentityService/GetAuthenticatedIdentity", - body=cast(object, maybe_transform({}, IdentityGetAuthenticatedIdentityParams)), - cast_to=httpx.Response, - options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, - ) + await async_client.identity.with_streaming_response.get_authenticated_identity().__aenter__() assert _get_open_connections(self.client) == 0 @mock.patch("gitpod._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: + async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter, async_client: AsyncGitpod) -> None: respx_mock.post("/gitpod.v1.IdentityService/GetAuthenticatedIdentity").mock(return_value=httpx.Response(500)) with pytest.raises(APIStatusError): - await self.client.post( - "/gitpod.v1.IdentityService/GetAuthenticatedIdentity", - body=cast(object, maybe_transform({}, IdentityGetAuthenticatedIdentityParams)), - cast_to=httpx.Response, - options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, - ) - + await async_client.identity.with_streaming_response.get_authenticated_identity().__aenter__() assert _get_open_connections(self.client) == 0 @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) @@ -1677,50 +1683,31 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: assert response.http_request.headers.get("x-stainless-retry-count") == "42" - def test_get_platform(self) -> None: - # A previous implementation of asyncify could leave threads unterminated when - # used with nest_asyncio. - # - # Since nest_asyncio.apply() is global and cannot be un-applied, this - # test is run in a separate process to avoid affecting other tests. - test_code = dedent(""" - import asyncio - import nest_asyncio - import threading - - from gitpod._utils import asyncify - from gitpod._base_client import get_platform - - async def test_main() -> None: - result = await asyncify(get_platform)() - print(result) - for thread in threading.enumerate(): - print(thread.name) - - nest_asyncio.apply() - asyncio.run(test_main()) - """) - with subprocess.Popen( - [sys.executable, "-c", test_code], - text=True, - ) as process: - timeout = 10 # seconds - - start_time = time.monotonic() - while True: - return_code = process.poll() - if return_code is not None: - if return_code != 0: - raise AssertionError("calling get_platform using asyncify resulted in a non-zero exit code") - - # success - break - - if time.monotonic() - start_time > timeout: - process.kill() - raise AssertionError("calling get_platform using asyncify resulted in a hung process") - - time.sleep(0.1) + async def test_get_platform(self) -> None: + platform = await asyncify(get_platform)() + assert isinstance(platform, (str, OtherPlatform)) + + 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") + + client = DefaultAsyncHttpxClient() + + mounts = tuple(client._mounts.items()) + assert len(mounts) == 1 + assert mounts[0][0].pattern == "https://" + + @pytest.mark.filterwarnings("ignore:.*deprecated.*:DeprecationWarning") + async def test_default_client_creation(self) -> None: + # Ensure that the client can be initialized without any exceptions + DefaultAsyncHttpxClient( + verify=True, + cert=None, + trust_env=True, + http1=True, + http2=False, + limits=httpx.Limits(max_connections=100, max_keepalive_connections=20), + ) @pytest.mark.respx(base_url=base_url) async def test_follow_redirects(self, respx_mock: MockRouter) -> None: diff --git a/tests/test_models.py b/tests/test_models.py index 7813b824..fad48103 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -1,5 +1,5 @@ import json -from typing import Any, Dict, List, Union, Optional, cast +from typing import TYPE_CHECKING, Any, Dict, List, Union, Optional, cast from datetime import datetime, timezone from typing_extensions import Literal, Annotated, TypeAliasType @@ -8,7 +8,7 @@ from pydantic import Field from gitpod._utils import PropertyInfo -from gitpod._compat import PYDANTIC_V2, parse_obj, model_dump, model_json +from gitpod._compat import PYDANTIC_V1, parse_obj, model_dump, model_json from gitpod._models import BaseModel, construct_type @@ -294,12 +294,12 @@ class Model(BaseModel): assert cast(bool, m.foo) is True m = Model.construct(foo={"name": 3}) - if PYDANTIC_V2: - assert isinstance(m.foo, Submodel1) - assert m.foo.name == 3 # type: ignore - else: + if PYDANTIC_V1: assert isinstance(m.foo, Submodel2) assert m.foo.name == "3" + else: + assert isinstance(m.foo, Submodel1) + assert m.foo.name == 3 # type: ignore def test_list_of_unions() -> None: @@ -426,10 +426,10 @@ class Model(BaseModel): expected = datetime(2019, 12, 27, 18, 11, 19, 117000, tzinfo=timezone.utc) - if PYDANTIC_V2: - expected_json = '{"created_at":"2019-12-27T18:11:19.117000Z"}' - else: + if PYDANTIC_V1: expected_json = '{"created_at": "2019-12-27T18:11:19.117000+00:00"}' + else: + expected_json = '{"created_at":"2019-12-27T18:11:19.117000Z"}' model = Model.construct(created_at="2019-12-27T18:11:19.117Z") assert model.created_at == expected @@ -531,7 +531,7 @@ class Model2(BaseModel): assert m4.to_dict(mode="python") == {"created_at": datetime.fromisoformat(time_str)} assert m4.to_dict(mode="json") == {"created_at": time_str} - if not PYDANTIC_V2: + if PYDANTIC_V1: with pytest.raises(ValueError, match="warnings is only supported in Pydantic v2"): m.to_dict(warnings=False) @@ -556,7 +556,7 @@ class Model(BaseModel): assert m3.model_dump() == {"foo": None} assert m3.model_dump(exclude_none=True) == {} - if not PYDANTIC_V2: + if PYDANTIC_V1: with pytest.raises(ValueError, match="round_trip is only supported in Pydantic v2"): m.model_dump(round_trip=True) @@ -580,10 +580,10 @@ class Model(BaseModel): assert json.loads(m.to_json()) == {"FOO": "hello"} assert json.loads(m.to_json(use_api_names=False)) == {"foo": "hello"} - if PYDANTIC_V2: - assert m.to_json(indent=None) == '{"FOO":"hello"}' - else: + if PYDANTIC_V1: assert m.to_json(indent=None) == '{"FOO": "hello"}' + else: + assert m.to_json(indent=None) == '{"FOO":"hello"}' m2 = Model() assert json.loads(m2.to_json()) == {} @@ -595,7 +595,7 @@ class Model(BaseModel): assert json.loads(m3.to_json()) == {"FOO": None} assert json.loads(m3.to_json(exclude_none=True)) == {} - if not PYDANTIC_V2: + if PYDANTIC_V1: with pytest.raises(ValueError, match="warnings is only supported in Pydantic v2"): m.to_json(warnings=False) @@ -622,7 +622,7 @@ class Model(BaseModel): assert json.loads(m3.model_dump_json()) == {"foo": None} assert json.loads(m3.model_dump_json(exclude_none=True)) == {} - if not PYDANTIC_V2: + if PYDANTIC_V1: with pytest.raises(ValueError, match="round_trip is only supported in Pydantic v2"): m.model_dump_json(round_trip=True) @@ -679,12 +679,12 @@ class B(BaseModel): ) assert isinstance(m, A) assert m.type == "a" - if PYDANTIC_V2: - assert m.data == 100 # type: ignore[comparison-overlap] - else: + if PYDANTIC_V1: # pydantic v1 automatically converts inputs to strings # if the expected type is a str assert m.data == "100" + else: + assert m.data == 100 # type: ignore[comparison-overlap] def test_discriminated_unions_unknown_variant() -> None: @@ -768,12 +768,12 @@ class B(BaseModel): ) assert isinstance(m, A) assert m.foo_type == "a" - if PYDANTIC_V2: - assert m.data == 100 # type: ignore[comparison-overlap] - else: + if PYDANTIC_V1: # pydantic v1 automatically converts inputs to strings # if the expected type is a str assert m.data == "100" + else: + assert m.data == 100 # type: ignore[comparison-overlap] def test_discriminated_unions_overlapping_discriminators_invalid_data() -> None: @@ -833,7 +833,7 @@ class B(BaseModel): assert UnionType.__discriminator__ is discriminator -@pytest.mark.skipif(not PYDANTIC_V2, reason="TypeAliasType is not supported in Pydantic v1") +@pytest.mark.skipif(PYDANTIC_V1, reason="TypeAliasType is not supported in Pydantic v1") def test_type_alias_type() -> None: Alias = TypeAliasType("Alias", str) # pyright: ignore @@ -849,7 +849,7 @@ class Model(BaseModel): assert m.union == "bar" -@pytest.mark.skipif(not PYDANTIC_V2, reason="TypeAliasType is not supported in Pydantic v1") +@pytest.mark.skipif(PYDANTIC_V1, reason="TypeAliasType is not supported in Pydantic v1") def test_field_named_cls() -> None: class Model(BaseModel): cls: str @@ -889,3 +889,75 @@ class ModelB(BaseModel): ) assert isinstance(m, ModelB) + + +def test_nested_discriminated_union() -> None: + class InnerType1(BaseModel): + type: Literal["type_1"] + + class InnerModel(BaseModel): + inner_value: str + + class InnerType2(BaseModel): + type: Literal["type_2"] + some_inner_model: InnerModel + + class Type1(BaseModel): + base_type: Literal["base_type_1"] + value: Annotated[ + Union[ + InnerType1, + InnerType2, + ], + PropertyInfo(discriminator="type"), + ] + + class Type2(BaseModel): + base_type: Literal["base_type_2"] + + T = Annotated[ + Union[ + Type1, + Type2, + ], + PropertyInfo(discriminator="base_type"), + ] + + model = construct_type( + type_=T, + value={ + "base_type": "base_type_1", + "value": { + "type": "type_2", + }, + }, + ) + assert isinstance(model, Type1) + assert isinstance(model.value, InnerType2) + + +@pytest.mark.skipif(PYDANTIC_V1, reason="this is only supported in pydantic v2 for now") +def test_extra_properties() -> None: + class Item(BaseModel): + prop: int + + class Model(BaseModel): + __pydantic_extra__: Dict[str, Item] = Field(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + other: str + + if TYPE_CHECKING: + + def __getattr__(self, attr: str) -> Item: ... + + model = construct_type( + type_=Model, + value={ + "a": {"prop": 1}, + "other": "foo", + }, + ) + assert isinstance(model, Model) + assert model.a.prop == 1 + assert isinstance(model.a, Item) + assert model.other == "foo" diff --git a/tests/test_transform.py b/tests/test_transform.py index 2a74ad4c..d3c756e2 100644 --- a/tests/test_transform.py +++ b/tests/test_transform.py @@ -15,7 +15,7 @@ parse_datetime, async_transform as _async_transform, ) -from gitpod._compat import PYDANTIC_V2 +from gitpod._compat import PYDANTIC_V1 from gitpod._models import BaseModel _T = TypeVar("_T") @@ -189,7 +189,7 @@ class DateModel(BaseModel): @pytest.mark.asyncio async def test_iso8601_format(use_async: bool) -> None: dt = datetime.fromisoformat("2023-02-23T14:16:36.337692+00:00") - tz = "Z" if PYDANTIC_V2 else "+00:00" + tz = "+00:00" if PYDANTIC_V1 else "Z" assert await transform({"foo": dt}, DatetimeDict, use_async) == {"foo": "2023-02-23T14:16:36.337692+00:00"} # type: ignore[comparison-overlap] assert await transform(DatetimeModel(foo=dt), Any, use_async) == {"foo": "2023-02-23T14:16:36.337692" + tz} # type: ignore[comparison-overlap] @@ -297,11 +297,11 @@ async def test_pydantic_unknown_field(use_async: bool) -> None: @pytest.mark.asyncio async def test_pydantic_mismatched_types(use_async: bool) -> None: model = MyModel.construct(foo=True) - if PYDANTIC_V2: + if PYDANTIC_V1: + params = await transform(model, Any, use_async) + else: with pytest.warns(UserWarning): params = await transform(model, Any, use_async) - else: - params = await transform(model, Any, use_async) assert cast(Any, params) == {"foo": True} @@ -309,11 +309,11 @@ async def test_pydantic_mismatched_types(use_async: bool) -> None: @pytest.mark.asyncio async def test_pydantic_mismatched_object_type(use_async: bool) -> None: model = MyModel.construct(foo=MyModel.construct(hello="world")) - if PYDANTIC_V2: + if PYDANTIC_V1: + params = await transform(model, Any, use_async) + else: with pytest.warns(UserWarning): params = await transform(model, Any, use_async) - else: - params = await transform(model, Any, use_async) assert cast(Any, params) == {"foo": {"hello": "world"}} diff --git a/tests/test_utils/test_datetime_parse.py b/tests/test_utils/test_datetime_parse.py new file mode 100644 index 00000000..21c16d43 --- /dev/null +++ b/tests/test_utils/test_datetime_parse.py @@ -0,0 +1,110 @@ +""" +Copied from https://github.com/pydantic/pydantic/blob/v1.10.22/tests/test_datetime_parse.py +with modifications so it works without pydantic v1 imports. +""" + +from typing import Type, Union +from datetime import date, datetime, timezone, timedelta + +import pytest + +from gitpod._utils import parse_date, parse_datetime + + +def create_tz(minutes: int) -> timezone: + return timezone(timedelta(minutes=minutes)) + + +@pytest.mark.parametrize( + "value,result", + [ + # Valid inputs + ("1494012444.883309", date(2017, 5, 5)), + (b"1494012444.883309", date(2017, 5, 5)), + (1_494_012_444.883_309, date(2017, 5, 5)), + ("1494012444", date(2017, 5, 5)), + (1_494_012_444, date(2017, 5, 5)), + (0, date(1970, 1, 1)), + ("2012-04-23", date(2012, 4, 23)), + (b"2012-04-23", date(2012, 4, 23)), + ("2012-4-9", date(2012, 4, 9)), + (date(2012, 4, 9), date(2012, 4, 9)), + (datetime(2012, 4, 9, 12, 15), date(2012, 4, 9)), + # Invalid inputs + ("x20120423", ValueError), + ("2012-04-56", ValueError), + (19_999_999_999, date(2603, 10, 11)), # just before watershed + (20_000_000_001, date(1970, 8, 20)), # just after watershed + (1_549_316_052, date(2019, 2, 4)), # nowish in s + (1_549_316_052_104, date(2019, 2, 4)), # nowish in ms + (1_549_316_052_104_324, date(2019, 2, 4)), # nowish in μs + (1_549_316_052_104_324_096, date(2019, 2, 4)), # nowish in ns + ("infinity", date(9999, 12, 31)), + ("inf", date(9999, 12, 31)), + (float("inf"), date(9999, 12, 31)), + ("infinity ", date(9999, 12, 31)), + (int("1" + "0" * 100), date(9999, 12, 31)), + (1e1000, date(9999, 12, 31)), + ("-infinity", date(1, 1, 1)), + ("-inf", date(1, 1, 1)), + ("nan", ValueError), + ], +) +def test_date_parsing(value: Union[str, bytes, int, float], result: Union[date, Type[Exception]]) -> None: + if type(result) == type and issubclass(result, Exception): # pyright: ignore[reportUnnecessaryIsInstance] + with pytest.raises(result): + parse_date(value) + else: + assert parse_date(value) == result + + +@pytest.mark.parametrize( + "value,result", + [ + # Valid inputs + # values in seconds + ("1494012444.883309", datetime(2017, 5, 5, 19, 27, 24, 883_309, tzinfo=timezone.utc)), + (1_494_012_444.883_309, datetime(2017, 5, 5, 19, 27, 24, 883_309, tzinfo=timezone.utc)), + ("1494012444", datetime(2017, 5, 5, 19, 27, 24, tzinfo=timezone.utc)), + (b"1494012444", datetime(2017, 5, 5, 19, 27, 24, tzinfo=timezone.utc)), + (1_494_012_444, datetime(2017, 5, 5, 19, 27, 24, tzinfo=timezone.utc)), + # values in ms + ("1494012444000.883309", datetime(2017, 5, 5, 19, 27, 24, 883, tzinfo=timezone.utc)), + ("-1494012444000.883309", datetime(1922, 8, 29, 4, 32, 35, 999117, tzinfo=timezone.utc)), + (1_494_012_444_000, datetime(2017, 5, 5, 19, 27, 24, tzinfo=timezone.utc)), + ("2012-04-23T09:15:00", datetime(2012, 4, 23, 9, 15)), + ("2012-4-9 4:8:16", datetime(2012, 4, 9, 4, 8, 16)), + ("2012-04-23T09:15:00Z", datetime(2012, 4, 23, 9, 15, 0, 0, timezone.utc)), + ("2012-4-9 4:8:16-0320", datetime(2012, 4, 9, 4, 8, 16, 0, create_tz(-200))), + ("2012-04-23T10:20:30.400+02:30", datetime(2012, 4, 23, 10, 20, 30, 400_000, create_tz(150))), + ("2012-04-23T10:20:30.400+02", datetime(2012, 4, 23, 10, 20, 30, 400_000, create_tz(120))), + ("2012-04-23T10:20:30.400-02", datetime(2012, 4, 23, 10, 20, 30, 400_000, create_tz(-120))), + (b"2012-04-23T10:20:30.400-02", datetime(2012, 4, 23, 10, 20, 30, 400_000, create_tz(-120))), + (datetime(2017, 5, 5), datetime(2017, 5, 5)), + (0, datetime(1970, 1, 1, 0, 0, 0, tzinfo=timezone.utc)), + # Invalid inputs + ("x20120423091500", ValueError), + ("2012-04-56T09:15:90", ValueError), + ("2012-04-23T11:05:00-25:00", ValueError), + (19_999_999_999, datetime(2603, 10, 11, 11, 33, 19, tzinfo=timezone.utc)), # just before watershed + (20_000_000_001, datetime(1970, 8, 20, 11, 33, 20, 1000, tzinfo=timezone.utc)), # just after watershed + (1_549_316_052, datetime(2019, 2, 4, 21, 34, 12, 0, tzinfo=timezone.utc)), # nowish in s + (1_549_316_052_104, datetime(2019, 2, 4, 21, 34, 12, 104_000, tzinfo=timezone.utc)), # nowish in ms + (1_549_316_052_104_324, datetime(2019, 2, 4, 21, 34, 12, 104_324, tzinfo=timezone.utc)), # nowish in μs + (1_549_316_052_104_324_096, datetime(2019, 2, 4, 21, 34, 12, 104_324, tzinfo=timezone.utc)), # nowish in ns + ("infinity", datetime(9999, 12, 31, 23, 59, 59, 999999)), + ("inf", datetime(9999, 12, 31, 23, 59, 59, 999999)), + ("inf ", datetime(9999, 12, 31, 23, 59, 59, 999999)), + (1e50, datetime(9999, 12, 31, 23, 59, 59, 999999)), + (float("inf"), datetime(9999, 12, 31, 23, 59, 59, 999999)), + ("-infinity", datetime(1, 1, 1, 0, 0)), + ("-inf", datetime(1, 1, 1, 0, 0)), + ("nan", ValueError), + ], +) +def test_datetime_parsing(value: Union[str, bytes, int, float], result: Union[datetime, Type[Exception]]) -> None: + if type(result) == type and issubclass(result, Exception): # pyright: ignore[reportUnnecessaryIsInstance] + with pytest.raises(result): + parse_datetime(value) + else: + assert parse_datetime(value) == result diff --git a/tests/utils.py b/tests/utils.py index d7dbee62..860e524c 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -4,7 +4,7 @@ import inspect import traceback import contextlib -from typing import Any, TypeVar, Iterator, cast +from typing import Any, TypeVar, Iterator, Sequence, cast from datetime import date, datetime from typing_extensions import Literal, get_args, get_origin, assert_type @@ -15,10 +15,11 @@ is_list_type, is_union_type, extract_type_arg, + is_sequence_type, is_annotated_type, is_type_alias_type, ) -from gitpod._compat import PYDANTIC_V2, field_outer_type, get_model_fields +from gitpod._compat import PYDANTIC_V1, field_outer_type, get_model_fields from gitpod._models import BaseModel BaseModelT = TypeVar("BaseModelT", bound=BaseModel) @@ -27,12 +28,12 @@ def assert_matches_model(model: type[BaseModelT], value: BaseModelT, *, path: list[str]) -> bool: for name, field in get_model_fields(model).items(): field_value = getattr(value, name) - if PYDANTIC_V2: - allow_none = False - else: + if PYDANTIC_V1: # in v1 nullability was structured differently # https://docs.pydantic.dev/2.0/migration/#required-optional-and-nullable-fields allow_none = getattr(field, "allow_none", False) + else: + allow_none = False assert_matches_type( field_outer_type(field), @@ -71,6 +72,13 @@ def assert_matches_type( if is_list_type(type_): return _assert_list_type(type_, value) + if is_sequence_type(type_): + assert isinstance(value, Sequence) + inner_type = get_args(type_)[0] + for entry in value: # type: ignore + assert_type(inner_type, entry) # type: ignore + return + if origin == str: assert isinstance(value, str) elif origin == int: